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/links.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/links.py')
-rw-r--r-- | app/api/responders/resource/links.py | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/app/api/responders/resource/links.py b/app/api/responders/resource/links.py index 33fd432..bd0a022 100644 --- a/app/api/responders/resource/links.py +++ b/app/api/responders/resource/links.py @@ -34,17 +34,19 @@ class Links(ResponderBase): link_states = self.get_constants_by_name("link_states") filters_requirements = { 'env_name': self.require(str, mandatory=True), - 'id': self.require(ObjectId, True), + 'id': self.require(ObjectId, convert_to_type=True), 'host': self.require(str), - 'link_type': self.require(str, validate=DataValidate.LIST, + 'link_type': self.require(str, + validate=DataValidate.LIST, requirement=link_types), 'link_name': self.require(str), 'source_id': self.require(str), 'target_id': self.require(str), - 'state': self.require(str, validate=DataValidate.LIST, + 'state': self.require(str, + validate=DataValidate.LIST, requirement=link_states), - '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, r'^attributes\:\w+$') |