Skip to content
Snippets Groups Projects
Commit eb1d3228 authored by Jean-Baptiste's avatar Jean-Baptiste
Browse files

bugfix: Allow notification only for Model subclasses

parent 6569dd63
No related branches found
No related tags found
No related merge requests found
......@@ -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):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment