Fix a bug: Sent notifications when a user only add a comment
parent
342a764f47
commit
4887ca55a9
|
@ -34,12 +34,9 @@ class NotificationSenderMixin(object):
|
||||||
self.notification_service.send_notification_email(self.create_notification_template,
|
self.notification_service.send_notification_email(self.create_notification_template,
|
||||||
users=users, context=context)
|
users=users, context=context)
|
||||||
else:
|
else:
|
||||||
changed_fields = obj.get_changed_fields_list(self.request.DATA)
|
context["changed_fields"] = obj.get_changed_fields_list(self.request.DATA)
|
||||||
|
self.notification_service.send_notification_email(self.update_notification_template,
|
||||||
if changed_fields:
|
users=users, context=context)
|
||||||
context["changed_fields"] = changed_fields
|
|
||||||
self.notification_service.send_notification_email(self.update_notification_template,
|
|
||||||
users=users, context=context)
|
|
||||||
|
|
||||||
def post_save(self, obj, created=False):
|
def post_save(self, obj, created=False):
|
||||||
super().post_save(obj, created)
|
super().post_save(obj, created)
|
||||||
|
|
Loading…
Reference in New Issue