Fixes duplicate notification on import

This commit is contained in:
Mouse Reeve 2022-11-07 10:36:31 -08:00
parent b64f0511a5
commit 1f022496dd

View file

@ -214,7 +214,7 @@ def notify_user_on_import_complete(
update_fields = update_fields or []
if not instance.complete or "complete" not in update_fields:
return
Notification.objects.create(
Notification.objects.get_or_create(
user=instance.user,
notification_type=Notification.IMPORT,
related_import=instance,