From 92a258dc413ebb560233e6a1f689c6cbd9770565 Mon Sep 17 00:00:00 2001 From: Chris Hill-Scott Date: Fri, 20 Jul 2018 09:17:20 +0100 Subject: [PATCH] Use model for template previews --- app/utils.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/utils.py b/app/utils.py index 2c57a5d9c..e180551cf 100644 --- a/app/utils.py +++ b/app/utils.py @@ -292,8 +292,8 @@ def get_template( if 'email' == template['template_type']: return EmailPreviewTemplate( template, - from_name=service['name'], - from_address='{}@notifications.service.gov.uk'.format(service['email_from']), + from_name=service.name, + from_address='{}@notifications.service.gov.uk'.format(service.email_from), expanded=expand_emails, show_recipient=show_recipient, redact_missing_personalisation=redact_missing_personalisation, @@ -302,8 +302,8 @@ def get_template( if 'sms' == template['template_type']: return SMSPreviewTemplate( template, - prefix=service['name'], - show_prefix=service['prefix_sms'], + prefix=service.name, + show_prefix=service.prefix_sms, sender=sms_sender, show_sender=bool(sms_sender), show_recipient=show_recipient,