bugfix: Allow notification only for Model subclasses

这个提交包含在:
Jean-Baptiste
2019-03-19 15:31:27 +01:00
父节点 6569dd63cd
当前提交 eb1d32285e

查看文件

@ -54,7 +54,7 @@ class Subscription(Model):
# --- SUBSCRIPTION SYSTEM ---
@receiver(post_save, dispatch_uid="callback_notif")
def send_notification(sender, instance, **kwargs):
if (sender != Notification and sender != LogEntry and sender != Session and sender != Token):
if sender != Notification and isinstance(sender, Model):
threads = []
url = settings.BASE_URL + Model.resource_id(instance) + '/'
for subscription in Subscription.objects.filter(object=url):