diff options
author | 2017-10-10 18:08:39 +0300 | |
---|---|---|
committer | 2017-10-10 15:11:31 +0000 | |
commit | 33802c45e4bc24c1e78f6b46cf968306cee2d4da (patch) | |
tree | cd56ab878d8c5aadff49f3c5c89cf265f64e664d /app/api/responders/resource/clique_constraints.py | |
parent | 87e9e89e07b751b64e9684f02928acb3467489c4 (diff) |
release 1.1 for euphrates
Change-Id: Iddc0e0148db7c72458b7fcdfcb7664e4aa609be0
Signed-off-by: Koren Lev <korenlev@gmail.com>
(cherry picked from commit 5c6eb170878cefa12f717a62c31f7228d440e61e)
Diffstat (limited to 'app/api/responders/resource/clique_constraints.py')
-rw-r--r-- | app/api/responders/resource/clique_constraints.py | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/app/api/responders/resource/clique_constraints.py b/app/api/responders/resource/clique_constraints.py index eddead9..09fa782 100644 --- a/app/api/responders/resource/clique_constraints.py +++ b/app/api/responders/resource/clique_constraints.py @@ -26,12 +26,13 @@ class CliqueConstraints(ResponderBase): filters = self.parse_query_params(req) focal_point_types = self.get_constants_by_name("object_types") filters_requirements = { - 'id': self.require(ObjectId, True), - 'focal_point_type': self.require(str, False, DataValidate.LIST, - focal_point_types), + 'id': self.require(ObjectId, convert_to_type=True), + 'focal_point_type': self.require(str, + validate=DataValidate.LIST, + requirement=focal_point_types), 'constraint': self.require([list, str]), - 'page': self.require(int, True), - 'page_size': self.require(int, True) + 'page': self.require(int, convert_to_type=True), + 'page_size': self.require(int, convert_to_type=True) } self.validate_query_data(filters, filters_requirements) page, page_size = self.get_pagination(filters) @@ -44,7 +45,8 @@ class CliqueConstraints(ResponderBase): else: clique_constraints_ids = self.get_objects_list(self.COLLECTION, query, - page, page_size, self.PROJECTION) + page, page_size, + self.PROJECTION) self.set_successful_response( resp, {"clique_constraints": clique_constraints_ids} ) |