mirror of
https://github.com/GSA/notifications-api.git
synced 2026-08-24 08:16:19 -04:00
Use new properties of utils Templates
We’ve added some new properties to the templates in utils that we can use instead of doing weird things like `WithSubjectTemplate.__str__(another_instance)`
This commit is contained in:
@@ -521,7 +521,7 @@ class NotificationWithPersonalisationSchema(NotificationWithTemplateSchema):
|
||||
def handle_template_merge(self, in_data):
|
||||
in_data['template'] = in_data.pop('template_history')
|
||||
template = get_template_instance(in_data['template'], in_data['personalisation'])
|
||||
in_data['body'] = str(template)
|
||||
in_data['body'] = template.content_with_placeholders_filled_in
|
||||
if in_data['template']['template_type'] != models.SMS_TYPE:
|
||||
in_data['subject'] = template.subject
|
||||
in_data['content_char_count'] = None
|
||||
|
||||
Reference in New Issue
Block a user