fix: don't notify creation for fields subscription
This commit is contained in:
parent
e1832ca932
commit
eb06f2c38c
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user