From eb1d32285e3143176257b723da6d4648fe170071 Mon Sep 17 00:00:00 2001
From: Jean-Baptiste <bleme@pm.me>
Date: Tue, 19 Mar 2019 15:31:27 +0100
Subject: [PATCH] bugfix: Allow notification only for Model subclasses

---
 djangoldp_notification/models.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/djangoldp_notification/models.py b/djangoldp_notification/models.py
index 06792a2..3f6b49a 100644
--- a/djangoldp_notification/models.py
+++ b/djangoldp_notification/models.py
@@ -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):
-- 
GitLab