equal
deleted
inserted
replaced
40 """ |
40 """ |
41 |
41 |
42 super(Logic, self).__init__(model=model, base_model=base_model, |
42 super(Logic, self).__init__(model=model, base_model=base_model, |
43 scope_logic=scope_logic) |
43 scope_logic=scope_logic) |
44 |
44 |
|
45 def getReviewsForEntity(self, entity, is_public, order=None): |
|
46 """Returns the reviews that have the given entity as scope. |
|
47 |
|
48 Args: |
|
49 entity: the entity which is the scope of the review |
|
50 is_public: determines if the public or non-public reviews are returned |
|
51 order: the optional ordering in which the reviews are returned |
|
52 """ |
|
53 |
|
54 fields = {'scope': entity, |
|
55 'is_public': is_public} |
|
56 |
|
57 query = self.getQueryForFields(fields, order) |
|
58 |
|
59 return self.getAll(query) |
|
60 |
45 logic = Logic() |
61 logic = Logic() |