aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--python_moondb/python_moondb/api/pdp.py2
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")