mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-11-30 13:31:08 +00:00
Merge pull request #2336 from bookwyrm-social/cancel-imports
Fixes duplicate notification on import
This commit is contained in:
commit
eb7777c0a1
1 changed files with 1 additions and 1 deletions
|
@ -214,7 +214,7 @@ def notify_user_on_import_complete(
|
||||||
update_fields = update_fields or []
|
update_fields = update_fields or []
|
||||||
if not instance.complete or "complete" not in update_fields:
|
if not instance.complete or "complete" not in update_fields:
|
||||||
return
|
return
|
||||||
Notification.objects.create(
|
Notification.objects.get_or_create(
|
||||||
user=instance.user,
|
user=instance.user,
|
||||||
notification_type=Notification.IMPORT,
|
notification_type=Notification.IMPORT,
|
||||||
related_import=instance,
|
related_import=instance,
|
||||||
|
|
Loading…
Reference in a new issue