From 5bac0214935ad6560e43cda90307764ed780c00e Mon Sep 17 00:00:00 2001 From: Chris Hill-Scott Date: Wed, 6 Dec 2017 21:59:34 +0000 Subject: [PATCH] Remove unused variable MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This variable isn’t used by our Jinja templates. Presumably it was from the time before instances of `Template` were responsible for showing who the email/text message was being sent to. --- app/main/views/send.py | 7 ------- 1 file changed, 7 deletions(-) diff --git a/app/main/views/send.py b/app/main/views/send.py index 6e8b81f44..d53053ed9 100644 --- a/app/main/views/send.py +++ b/app/main/views/send.py @@ -21,7 +21,6 @@ from flask import ( from flask_login import login_required, current_user from notifications_python_client.errors import HTTPError -from notifications_utils.columns import Columns from notifications_utils.recipients import ( RecipientCSV, first_column_headings, @@ -523,18 +522,12 @@ def _check_messages(service_id, template_type, upload_id, letters_as_pdf=False): choose_time_form = ChooseTimeForm() with suppress(StopIteration): - first_recipient = None template.values = next(recipients.rows) - first_recipient = template.values.get( - Columns.make_key(recipients.recipient_column_headers[0]), - '' - ) session['upload_data']['notification_count'] = len(list(recipients.rows)) session['upload_data']['valid'] = not recipients.has_errors return dict( recipients=recipients, - first_recipient=first_recipient, template=template, errors=recipients.has_errors, row_errors=get_errors_for_csv(recipients, template.template_type),