diff options
author | thuva4 <tharma.thuva@gmail.com> | 2018-02-26 09:48:45 +0530 |
---|---|---|
committer | thuva4 <tharma.thuva@gmail.com> | 2018-03-01 12:29:16 +0530 |
commit | 4aa95918da586d3c1f9bf19a19c5cd55541c38d0 (patch) | |
tree | f822c1c3c658b9b76ecc8cf89bbfe53e8d850c7f /testapi/opnfv_testapi/handlers/base_handlers.py | |
parent | 7ac324f4b4bb2d190bf0888d12054663e095cc77 (diff) |
Prevent to delete the pods
Do not allow to delete pods which are associated
with test-results
JIRA: RELENG-350
Change-Id: I8cb306d719acebff257048f08bcb981d81c64513
Signed-off-by: thuva4 <tharma.thuva@gmail.com>
Diffstat (limited to 'testapi/opnfv_testapi/handlers/base_handlers.py')
-rw-r--r-- | testapi/opnfv_testapi/handlers/base_handlers.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/testapi/opnfv_testapi/handlers/base_handlers.py b/testapi/opnfv_testapi/handlers/base_handlers.py index ed4aeb2..350c38d 100644 --- a/testapi/opnfv_testapi/handlers/base_handlers.py +++ b/testapi/opnfv_testapi/handlers/base_handlers.py @@ -179,7 +179,7 @@ class GenericApiHandler(web.RequestHandler): @gen.coroutine @check.not_exist @check.is_authorized - @check.is_allowed + @check.is_reource_tied def _delete(self, data, query=None): yield dbapi.db_delete(self.table, query) self.finish_request() @@ -190,7 +190,7 @@ class GenericApiHandler(web.RequestHandler): @check.not_exist @check.updated_one_not_exist @check.is_authorized - @check.is_allowed + @check.is_reource_tied def _update(self, data, query=None, **kwargs): data = self.table_cls.from_dict(data) update_req = self._update_requests(data) |