diff options
author | ReemMahmoud <rfawzy.ext@orange.com> | 2018-01-03 15:40:49 +0200 |
---|---|---|
committer | ReemMahmoud <rfawzy.ext@orange.com> | 2018-01-03 15:40:49 +0200 |
commit | b01b0784b8f350f50bd7ed9ed4794483691e63b3 (patch) | |
tree | 9a45b11d2b01e566ec2c824f4fa9dc6b964a1ce9 /python_moondb | |
parent | 52d037e757ac2189978e1129f469929fe73a9b7f (diff) |
Add update exception
Change-Id: I51b3febf3a9e6a6d40fde51329a6a619581b7077
Signed-off-by: ReemMahmoud <rfawzy.ext@orange.com>
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") |