From b866b01a17078784e93294a3c11f868db171569f Mon Sep 17 00:00:00 2001
From: Sylvain Le Bon <sylvain@startinblox.com>
Date: Sat, 14 Oct 2023 19:10:20 +0200
Subject: [PATCH] update: no notifications on migrations

---
 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 4425bd5..fa65eaf 100644
--- a/djangoldp_notification/models.py
+++ b/djangoldp_notification/models.py
@@ -147,7 +147,7 @@ def create_nested_subscribers(sender, instance, created, **kwargs):
 @receiver(post_delete, dispatch_uid="delete_callback_notif")
 @receiver(m2m_changed, dispatch_uid="m2m_callback_notif")
 def notify(sender, instance, created=None, model=None, pk_set=set(), action='', **kwargs):
-    if type(instance).__name__ not in ["ScheduledActivity", "LogEntry", "Activity"] and sender != Notification \
+    if type(instance).__name__ not in ["ScheduledActivity", "LogEntry", "Activity", "Migration"] and sender != Notification \
         and action not in ['pre_add', 'pre_remove']:
         if action or created is False:
             request_type = 'update' #M2M change or post_save
-- 
GitLab