fix keyerror in plcorebase.delete
diff --git a/planetstack/core/models/plcorebase.py b/planetstack/core/models/plcorebase.py
index 000e77e..57025b4 100644
--- a/planetstack/core/models/plcorebase.py
+++ b/planetstack/core/models/plcorebase.py
@@ -117,14 +117,17 @@
def delete(self, *args, **kwds):
# so we have something to give the observer
purge = kwds.get('purge',False)
+ if purge:
+ del kwds['purge']
silent = kwds.get('silent',False)
+ if silent:
+ del kwds['silent']
try:
purge = purge or observer_disabled
except NameError:
pass
if (purge):
- del kwds['purge']
super(PlCoreBase, self).delete(*args, **kwds)
else:
self.deleted = True
diff --git a/planetstack/core/models/user.py b/planetstack/core/models/user.py
index 1b3be29..8dc87b3 100644
--- a/planetstack/core/models/user.py
+++ b/planetstack/core/models/user.py
@@ -135,6 +135,8 @@
def delete(self, *args, **kwds):
# so we have something to give the observer
purge = kwds.get('purge',False)
+ if purge:
+ del kwds['purge']
try:
purge = purge or observer_disabled
except NameError: