summaryrefslogtreecommitdiffstats
path: root/result_collection_api/resources/result_handlers.py
diff options
context:
space:
mode:
authorMorgan Richomme <morgan.richomme@orange.com>2016-05-31 14:42:08 +0000
committerGerrit Code Review <gerrit@172.30.200.206>2016-05-31 14:42:08 +0000
commitfa69670740d165b896eebd9efaa071482f0b8fd8 (patch)
tree3fd3b68731bae2ab5daeda4dc7305e0399d0735d /result_collection_api/resources/result_handlers.py
parentb138bbe853a26c63ac978824648429321f92868c (diff)
parentc6ace67b6c587663dd83b5aa6afb126380e16678 (diff)
Merge "bugfix: query results failed due to wrong using type of trust_indicator"
Diffstat (limited to 'result_collection_api/resources/result_handlers.py')
-rw-r--r--result_collection_api/resources/result_handlers.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/result_collection_api/resources/result_handlers.py b/result_collection_api/resources/result_handlers.py
index e7fce47..1d52235 100644
--- a/result_collection_api/resources/result_handlers.py
+++ b/result_collection_api/resources/result_handlers.py
@@ -32,6 +32,8 @@ class GenericResultHandler(GenericApiHandler):
period = datetime.now() - timedelta(days=v)
obj = {"$gte": str(period)}
query['creation_date'] = obj
+ elif k == 'trust_indicator':
+ query[k] = float(v)
else:
query[k] = v
return query
@@ -98,7 +100,7 @@ class ResultsCLHandler(GenericResultHandler):
@type period: L{string}
@in period: query
@required period: False
- @param trust_indicator: must be integer
+ @param trust_indicator: must be int/long/float
@type trust_indicator: L{string}
@in trust_indicator: query
@required trust_indicator: False