summaryrefslogtreecommitdiffstats
path: root/result_collection_api/resources/result_handlers.py
diff options
context:
space:
mode:
authorSerenaFeng <feng.xiaowei@zte.com.cn>2016-05-31 20:44:03 +0800
committerSerenaFeng <feng.xiaowei@zte.com.cn>2016-05-31 20:45:57 +0800
commitc6ace67b6c587663dd83b5aa6afb126380e16678 (patch)
tree76febbcad1ea4cd5da1043e35a3895350c945abe /result_collection_api/resources/result_handlers.py
parentcd68f499572ae87b1aa3213a389c8931a7035387 (diff)
bugfix: query results failed due to wrong using type of trust_indicator
trust_indicator must be int/long/float rather than string JIRA: FUNCTEST-280 Change-Id: I2e2b292f9181fd28896bfe1e3b86ec3976b65016 Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
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