diff options
author | 2016-02-23 18:35:46 +0100 | |
---|---|---|
committer | 2016-02-23 18:38:37 +0100 | |
commit | d172921af5d56a55018af9776b85a2ddfad980bb (patch) | |
tree | a784bde53f806d4a0f05ccb2b4f7f880c91fb5ab /result_collection_api/resources/handlers.py | |
parent | 536e47b595d4fc75385f6b92874c413559ce4788 (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 'result_collection_api/resources/handlers.py')
-rw-r--r-- | result_collection_api/resources/handlers.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/result_collection_api/resources/handlers.py b/result_collection_api/resources/handlers.py index be08c97..6443fc4 100644 --- a/result_collection_api/resources/handlers.py +++ b/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 |