From 09d46e12cd5983bcde49bd77499e1175e5ed118a Mon Sep 17 00:00:00 2001 From: SerenaFeng Date: Wed, 15 Jun 2016 15:45:40 +0800 Subject: delete creation_date of results in testAPI check if it is results collection when assign creation_date JIRA: FUNCTEST-314 Change-Id: I8e70aa67a39560bdf337f6b0017d2aa8c7c48176 Signed-off-by: SerenaFeng --- utils/test/result_collection_api/opnfv_testapi/resources/handlers.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'utils/test/result_collection_api/opnfv_testapi') diff --git a/utils/test/result_collection_api/opnfv_testapi/resources/handlers.py b/utils/test/result_collection_api/opnfv_testapi/resources/handlers.py index df920c48f..cc4a4c357 100644 --- a/utils/test/result_collection_api/opnfv_testapi/resources/handlers.py +++ b/utils/test/result_collection_api/opnfv_testapi/resources/handlers.py @@ -96,7 +96,8 @@ class GenericApiHandler(RequestHandler): code, message = error(data) raise HTTPError(code, message) - data.creation_date = datetime.now() + if self.table != 'results': + data.creation_date = datetime.now() _id = yield self._eval_db(self.table, 'insert', data.format()) if 'name' in self.json_args: resource = data.name -- cgit 1.2.3-korg