diff --git a/app/main/views/send.py b/app/main/views/send.py index b1cea53a88..560c5cb3ad 100644 --- a/app/main/views/send.py +++ b/app/main/views/send.py @@ -560,7 +560,9 @@ def _check_messages(service_id, template_id, upload_id, preview_row): if preview_row < len(recipients) + 2: template.values = recipients[preview_row - 2].recipient_and_personalisation - simplifed_template.values = recipients[preview_row - 2].recipient_and_personalisation + simplifed_template.values = recipients[ + preview_row - 2 + ].recipient_and_personalisation elif preview_row > 2: abort(404) @@ -863,7 +865,7 @@ def _check_notification(service_id, template_id, exception=None): back_link_from_preview=back_link_from_preview, choose_time_form=choose_time_form, **(get_template_error_dict(exception) if exception else {}), - simplifed_template=simplifed_template + simplifed_template=simplifed_template, ) diff --git a/tests/app/main/views/test_send.py b/tests/app/main/views/test_send.py index 35309f57fc..a33f975ba4 100644 --- a/tests/app/main/views/test_send.py +++ b/tests/app/main/views/test_send.py @@ -2612,8 +2612,10 @@ def test_preview_notification_shows_preview( session["placeholders"] = {} page = client_request.post( - "main.preview_notification", service_id=service_one["id"], template_id=fake_uuid, - _expected_status=200 + "main.preview_notification", + service_id=service_one["id"], + template_id=fake_uuid, + _expected_status=200, ) assert page.h1.text.strip() == "Preview" assert (page.find_all("a", {"class": "usa-back-link"})[0]["href"]) == url_for(