Remove unused variable

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.
This commit is contained in:
Chris Hill-Scott
2017-12-06 21:59:34 +00:00
parent acdaad966c
commit 5bac021493

View File

@@ -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),