from django.db.models.signals import post_save
from django.dispatch import receiver
import pdb
from core.models import *
import model_policies

@receiver(post_save)
def post_save_handler(sender, **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)
		except:
			pass

@@ -187,16 +187,26 @@
 (sender,
+ instance,
  **kwarg
@@ -411,22 +411,24 @@
 .handle(
-sender
+instance
 )%0A%09%09exce

fix model_policies being called with class instead of instance