fix model_policies being called with class instead of instance
diff --git a/planetstack/model_policy.py b/planetstack/model_policy.py
index dbe8453..32d8f8e 100644
--- a/planetstack/model_policy.py
+++ b/planetstack/model_policy.py
@@ -5,13 +5,13 @@
import model_policies
@receiver(post_save)
-def post_save_handler(sender, **kwargs):
+def post_save_handler(sender, instance, **kwargs):
sender_name = sender.__name__
policy_name = 'model_policy_%s'%sender_name
if (not kwargs['update_fields']):
try:
policy_handler = getattr(model_policies, policy_name)
- policy_handler.handle(sender)
+ policy_handler.handle(instance)
except:
pass