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

fix: don't notify creation for fields subscription

parent e1832ca9
No related branches found
No related tags found
No related merge requests found
Pipeline #10017 passed
...@@ -150,6 +150,9 @@ def send_notification(sender, instance, **kwargs): ...@@ -150,6 +150,9 @@ def send_notification(sender, instance, **kwargs):
# I may have configured to send the subscription to a foreign key # I may have configured to send the subscription to a foreign key
if subscription.field is not None and len(subscription.field) > 1: if subscription.field is not None and len(subscription.field) > 1:
try: try:
if kwargs.get("created"):
continue
instance = getattr(instance, subscription.field, instance) instance = getattr(instance, subscription.field, instance)
# don't send notifications for foreign resources # don't send notifications for foreign resources
......
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