From 243b1580bb48ee67a99d08d320f4fb7e611792c5 Mon Sep 17 00:00:00 2001 From: Morgan Richomme Date: Tue, 23 Feb 2016 18:35:46 +0100 Subject: fix bug on period in Test API JIRA: RELENG-46 Change-Id: I416886e2cddf9369141d5f1f09e54e8c3dd02ed9 Signed-off-by: Morgan Richomme --- utils/test/result_collection_api/resources/handlers.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'utils') 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 -- cgit 1.2.3-korg