diff options
Diffstat (limited to 'cvp/opnfv_testapi/resources')
-rw-r--r-- | cvp/opnfv_testapi/resources/test_handlers.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/cvp/opnfv_testapi/resources/test_handlers.py b/cvp/opnfv_testapi/resources/test_handlers.py index b28a15d3..77656ae9 100644 --- a/cvp/opnfv_testapi/resources/test_handlers.py +++ b/cvp/opnfv_testapi/resources/test_handlers.py @@ -196,10 +196,16 @@ class TestsGURHandler(GenericTestHandler): return curr_user = self.get_secure_cookie(auth_const.OPENID) - if item in {"shared", "label"}: + if item in {"shared", "label", "sut_label"}: query['owner'] = curr_user db_keys.append('owner') + if item == 'sut_label': + if test['status'] != 'private' and not value: + msg = 'SUT version cannot be changed to None after submitting.' + self.finish_request({'code': 403, 'msg': msg}) + return + if item == "status": if value in {'approved', 'not approved'}: if test['status'] == 'private': |