Fix a bug: Sent notifications when a user only add a comment

remotes/origin/enhancement/email-actions
David Barragán Merino 2014-04-24 12:54:01 +02:00
parent 342a764f47
commit 4887ca55a9
1 changed files with 3 additions and 6 deletions

View File

@ -34,12 +34,9 @@ class NotificationSenderMixin(object):
self.notification_service.send_notification_email(self.create_notification_template,
users=users, context=context)
else:
changed_fields = obj.get_changed_fields_list(self.request.DATA)
if changed_fields:
context["changed_fields"] = changed_fields
self.notification_service.send_notification_email(self.update_notification_template,
users=users, context=context)
context["changed_fields"] = obj.get_changed_fields_list(self.request.DATA)
self.notification_service.send_notification_email(self.update_notification_template,
users=users, context=context)
def post_save(self, obj, created=False):
super().post_save(obj, created)