Commit 8c51a63e authored by Romain Courteaud's avatar Romain Courteaud

slapos_crm: no need to build email when using notification message

parent 1d573001
......@@ -31,12 +31,6 @@ if attachment:
name=name)
attachment_list.append(attachment)
email = buildEmailMessage(from_url=None,
to_url=None,
msg=text_content,
subject=title,
attachment_list=attachment_list)
if direction == 'outgoing':
source_relative_url = source or ticket.getSource()
source_section_relative_url = ticket.getSourceSection()
......@@ -84,6 +78,11 @@ if notification_message:
# Prefer using the notification message title
# as it will be correctly translated
if not event.hasTitle():
email = buildEmailMessage(from_url=None,
to_url=None,
msg=text_content,
subject=title,
attachment_list=attachment_list)
event.edit(
data=email.as_string()
)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment