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

bugfix: fix login by avoiding sending notification on new Token

parent 2a4550ae
No related branches found
No related tags found
No related merge requests found
......@@ -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):
......
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