diff --git a/djangoldp_notification/models.py b/djangoldp_notification/models.py index 92c33b2867f9d9f2999356c6331103156c35408e..5810302196a9401b1e8a7d2abaa50f2585442260 100644 --- a/djangoldp_notification/models.py +++ b/djangoldp_notification/models.py @@ -6,6 +6,8 @@ from threading import Thread from django.contrib.sessions.models import Session from django.db import models from django.conf import settings +from oidc_provider.models import Token + from djangoldp.fields import LDPUrlField from django.db.models.signals import post_save from django.dispatch import receiver @@ -47,7 +49,7 @@ class Subscription(models.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): + if (sender != Notification and sender != LogEntry and sender != Session and sender != Token): threads = [] url = settings.BASE_URL + Model.resource_id(instance) + '/' for subscription in Subscription.objects.filter(object=url):