Remove unused variable

Presume this is from when we used to render the letter preview in a
different way. Removing this saves us an API call every time we’re
loading this page.
This commit is contained in:
Chris Hill-Scott
2019-07-08 11:25:06 +01:00
parent 7fef51aa6a
commit 76dd222726

View File

@@ -57,13 +57,7 @@ def view_template(service_id, template_id):
return redirect(url_for(
'.send_one_off', service_id=service_id, template_id=template_id
))
if template["template_type"] == "letter":
letter_contact_details = service_api_client.get_letter_contacts(service_id)
default_letter_contact_block_id = next(
(x['id'] for x in letter_contact_details if x['is_default']), None
)
else:
default_letter_contact_block_id = None
return render_template(
'views/templates/template.html',
template=get_template(
@@ -81,7 +75,6 @@ def view_template(service_id, template_id):
),
template_postage=template["postage"],
user_has_template_permission=user_has_template_permission,
default_letter_contact_block_id=default_letter_contact_block_id,
)