diff options
author | Ruan HE <ruan.he@orange.com> | 2018-01-03 13:57:31 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@opnfv.org> | 2018-01-03 13:57:31 +0000 |
commit | 681cfafb6a58757d2c56a135d909561d4a654a13 (patch) | |
tree | 286b5fd1ca31a5fb3c872015143c0ee74f0b9040 /python_moondb | |
parent | 6d73ea7305c469fc983f29d85743663877fe0882 (diff) | |
parent | b01b0784b8f350f50bd7ed9ed4794483691e63b3 (diff) |
Merge "Add update exception"
Diffstat (limited to 'python_moondb')
-rw-r--r-- | python_moondb/python_moondb/api/pdp.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/python_moondb/python_moondb/api/pdp.py b/python_moondb/python_moondb/api/pdp.py index d39418b8..7e852ca8 100644 --- a/python_moondb/python_moondb/api/pdp.py +++ b/python_moondb/python_moondb/api/pdp.py @@ -20,6 +20,8 @@ class PDPManager(Managers): @enforce(("read", "write"), "pdp") def update_pdp(self, user_id, pdp_id, value): + if pdp_id not in self.driver.get_pdp(pdp_id=pdp_id): + raise exceptions.PdpUnknown return self.driver.update_pdp(pdp_id=pdp_id, value=value) @enforce(("read", "write"), "pdp") |