diff options
Diffstat (limited to 'cvp/opnfv_testapi')
-rw-r--r-- | cvp/opnfv_testapi/resources/test_handlers.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/cvp/opnfv_testapi/resources/test_handlers.py b/cvp/opnfv_testapi/resources/test_handlers.py index 161585ef..2b5f28c2 100644 --- a/cvp/opnfv_testapi/resources/test_handlers.py +++ b/cvp/opnfv_testapi/resources/test_handlers.py @@ -221,7 +221,14 @@ class TestsGURHandler(GenericTestHandler): query['owner'] = curr_user db_keys.append('owner') - test_query = {'id': test['id'], 'status': 'review'} + test_query = { + 'id': test['id'], + '$or': [ + {'status': 'review'}, + {'status': 'approved'}, + {'status': 'not approved'} + ] + } record = yield dbapi.db_find_one("tests", test_query) if record: msg = ('{} has already submitted one record with the same ' |