diff options
Diffstat (limited to 'cvp/opnfv_testapi/resources')
-rw-r--r-- | cvp/opnfv_testapi/resources/test_handlers.py | 2 | ||||
-rw-r--r-- | cvp/opnfv_testapi/resources/test_models.py | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/cvp/opnfv_testapi/resources/test_handlers.py b/cvp/opnfv_testapi/resources/test_handlers.py index 2cbfbf10..54fa11f8 100644 --- a/cvp/opnfv_testapi/resources/test_handlers.py +++ b/cvp/opnfv_testapi/resources/test_handlers.py @@ -189,7 +189,7 @@ class TestsGURHandler(GenericTestHandler): query = {'id': test_id} db_keys = ['id', ] curr_user = self.get_secure_cookie(auth_const.OPENID) - if item == "shared": + if item == "shared" or item == "label": query['owner'] = curr_user db_keys.append('owner') logging.debug("before _update 2") diff --git a/cvp/opnfv_testapi/resources/test_models.py b/cvp/opnfv_testapi/resources/test_models.py index 41fa6852..24b4d17b 100644 --- a/cvp/opnfv_testapi/resources/test_models.py +++ b/cvp/opnfv_testapi/resources/test_models.py @@ -53,7 +53,7 @@ class Test(models.ModelBase): """ def __init__(self, _id=None, owner=None, results=[], public="false", review="false", status="private", - shared=[], trust_indicator=None): + shared=[], filename="", label="", trust_indicator=None): self._id = _id self.owner = owner self.results = results @@ -62,6 +62,8 @@ class Test(models.ModelBase): self.upload_date = datetime.now() self.status = status self.shared = shared + self.filename = filename + self.label = label @swagger.model() |