summaryrefslogtreecommitdiffstats
path: root/utils/test/result_collection_api
diff options
context:
space:
mode:
authorMorgan Richomme <morgan.richomme@orange.com>2016-02-23 18:35:46 +0100
committerMorgan Richomme <morgan.richomme@orange.com>2016-02-23 18:38:37 +0100
commit243b1580bb48ee67a99d08d320f4fb7e611792c5 (patch)
treed4da00aa9335af767af94215e0cf6286355a3506 /utils/test/result_collection_api
parent82d0297873f9dedab05731990ac0465e75d21cd9 (diff)
fix bug on period in Test API
JIRA: RELENG-46 Change-Id: I416886e2cddf9369141d5f1f09e54e8c3dd02ed9 Signed-off-by: Morgan Richomme <morgan.richomme@orange.com>
Diffstat (limited to 'utils/test/result_collection_api')
-rw-r--r--utils/test/result_collection_api/resources/handlers.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/utils/test/result_collection_api/resources/handlers.py b/utils/test/result_collection_api/resources/handlers.py
index be08c9791..6443fc417 100644
--- a/utils/test/result_collection_api/resources/handlers.py
+++ b/utils/test/result_collection_api/resources/handlers.py
@@ -552,7 +552,7 @@ class TestResultsHandler(GenericApiHandler):
if period_arg > 0:
period = datetime.now() - timedelta(days=period_arg)
- obj = {"$gte": period}
+ obj = {"$gte": str(period)}
get_request["creation_date"] = obj
else:
get_request["_id"] = result_id
@@ -705,7 +705,7 @@ class DashboardHandler(GenericApiHandler):
raise HTTPError(HTTP_BAD_REQUEST)
if period_arg > 0:
period = datetime.now() - timedelta(days=period_arg)
- obj = {"$gte": period}
+ obj = {"$gte": str(period)}
get_request["creation_date"] = obj
else:
get_request["_id"] = result_id