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: ...@@ -31,12 +31,6 @@ if attachment:
name=name) name=name)
attachment_list.append(attachment) attachment_list.append(attachment)
email = buildEmailMessage(from_url=None,
to_url=None,
msg=text_content,
subject=title,
attachment_list=attachment_list)
if direction == 'outgoing': if direction == 'outgoing':
source_relative_url = source or ticket.getSource() source_relative_url = source or ticket.getSource()
source_section_relative_url = ticket.getSourceSection() source_section_relative_url = ticket.getSourceSection()
...@@ -84,6 +78,11 @@ if notification_message: ...@@ -84,6 +78,11 @@ if notification_message:
# Prefer using the notification message title # Prefer using the notification message title
# as it will be correctly translated # as it will be correctly translated
if not event.hasTitle(): if not event.hasTitle():
email = buildEmailMessage(from_url=None,
to_url=None,
msg=text_content,
subject=title,
attachment_list=attachment_list)
event.edit( event.edit(
data=email.as_string() 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