First things to implement a event change log

This commit is contained in:
2020-09-29 15:28:48 +02:00
parent 6ddef0c736
commit 9addc237bd
6 changed files with 166 additions and 14 deletions

View File

@@ -312,10 +312,9 @@ class BasicWorkflow(object):
if not app_config.settings.enable_email_on_update:
return
if len(diff) < 1:
if not diff:
logger.debug('send_emails_on_update(): No diff data -> Skip sending mails.')
return
diff_text = '\n'.join(diff[3:])
# Who should be informed about the update?
recipients = [event.owner]
@@ -329,7 +328,7 @@ class BasicWorkflow(object):
for recipient in recipients:
if recipient.email and recipient.email != updater.email:
email = emails.EventUpdatedMail(recipient=recipient, event=event, editor=updater, diff=diff_text)
email = emails.EventUpdatedMail(recipient=recipient, event=event, editor=updater, diff=diff)
email.send()
def send_emails_on_status_update(self, flag):