From 17b8c0194b1c1c83c3868919821f5254f5717e98 Mon Sep 17 00:00:00 2001 From: Chris Hill-Scott Date: Mon, 2 Sep 2019 16:12:56 +0100 Subject: [PATCH 1/2] Update utils and remove `expanded` argument This argument was removed in https://github.com/alphagov/notifications-utils/pull/643 --- app/utils.py | 1 - requirements-app.txt | 2 +- requirements.txt | 8 ++++---- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/app/utils.py b/app/utils.py index b3ded9282..593856e87 100644 --- a/app/utils.py +++ b/app/utils.py @@ -355,7 +355,6 @@ def get_template( template, 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, reply_to=email_reply_to, diff --git a/requirements-app.txt b/requirements-app.txt index 9f448f483..f1679ed4d 100644 --- a/requirements-app.txt +++ b/requirements-app.txt @@ -23,4 +23,4 @@ awscli-cwlogs>=1.4,<1.5 # Putting upgrade on hold due to v1.0.0 using sha512 instead of sha1 by default itsdangerous==0.24 # pyup: <1.0.0 -git+https://github.com/alphagov/notifications-utils.git@33.2.9#egg=notifications-utils==33.2.9 +git+https://github.com/alphagov/notifications-utils.git@34.0.0#egg=notifications-utils==34.0.0 diff --git a/requirements.txt b/requirements.txt index c583d9c39..a3fd27c16 100644 --- a/requirements.txt +++ b/requirements.txt @@ -25,13 +25,13 @@ awscli-cwlogs>=1.4,<1.5 # Putting upgrade on hold due to v1.0.0 using sha512 instead of sha1 by default itsdangerous==0.24 # pyup: <1.0.0 -git+https://github.com/alphagov/notifications-utils.git@33.2.9#egg=notifications-utils==33.2.9 +git+https://github.com/alphagov/notifications-utils.git@34.0.0#egg=notifications-utils==34.0.0 ## The following requirements were added by pip freeze: -awscli==1.16.228 +awscli==1.16.230 bleach==3.1.0 boto3==1.6.16 -botocore==1.12.218 +botocore==1.12.220 certifi==2019.6.16 chardet==3.0.4 Click==7.0 @@ -55,7 +55,7 @@ monotonic==1.5 openpyxl==2.5.14 orderedset==2.0.1 phonenumbers==8.10.13 -pyasn1==0.4.6 +pyasn1==0.4.7 pyexcel-ezodf==0.3.4 PyJWT==1.7.1 PyPDF2==1.26.0 From 40e020d40d4331c4163b8e5adf2841d361c43ff6 Mon Sep 17 00:00:00 2001 From: Chris Hill-Scott Date: Mon, 2 Sep 2019 16:15:24 +0100 Subject: [PATCH 2/2] Remove expand_emails argument from get_template MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It isn’t used for anything now. --- app/main/views/notifications.py | 1 - app/main/views/send.py | 4 ---- app/main/views/templates.py | 5 ----- app/utils.py | 1 - 4 files changed, 11 deletions(-) diff --git a/app/main/views/notifications.py b/app/main/views/notifications.py index 28ac9b9b1..f9d381edc 100644 --- a/app/main/views/notifications.py +++ b/app/main/views/notifications.py @@ -79,7 +79,6 @@ def view_notification(service_id, notification_id): notification_id=notification_id, filetype='png', ), - expand_emails=True, page_count=page_count, show_recipient=True, redact_missing_personalisation=True, diff --git a/app/main/views/send.py b/app/main/views/send.py index c6206e494..b0bfdb50f 100644 --- a/app/main/views/send.py +++ b/app/main/views/send.py @@ -133,7 +133,6 @@ def send_messages(service_id, template_id): db_template, current_service, show_recipient=True, - expand_emails=True, letter_preview_url=url_for( '.view_letter_template_preview', service_id=service_id, @@ -363,7 +362,6 @@ def send_test_step(service_id, template_id, step_index): db_template, current_service, show_recipient=True, - expand_emails=True, letter_preview_url=url_for( '.send_test_preview', service_id=service_id, @@ -528,7 +526,6 @@ def _check_messages(service_id, template_id, upload_id, preview_row, letters_as_ db_template, current_service, show_recipient=True, - expand_emails=True, letter_preview_url=url_for( '.check_messages_preview', service_id=service_id, @@ -857,7 +854,6 @@ def _check_notification(service_id, template_id, exception=None): db_template, current_service, show_recipient=True, - expand_emails=True, email_reply_to=email_reply_to, sms_sender=sms_sender, letter_preview_url=url_for( diff --git a/app/main/views/templates.py b/app/main/views/templates.py index 5c6722f8d..7a5923e13 100644 --- a/app/main/views/templates.py +++ b/app/main/views/templates.py @@ -63,7 +63,6 @@ def view_template(service_id, template_id): template=get_template( template, current_service, - expand_emails=True, letter_preview_url=url_for( '.view_letter_template_preview', service_id=service_id, @@ -251,7 +250,6 @@ def _view_template_version(service_id, template_id, version, letters_as_pdf=Fals return dict(template=get_template( current_service.get_template(template_id, version=version), current_service, - expand_emails=True, letter_preview_url=url_for( '.view_template_version_preview', service_id=service_id, @@ -674,7 +672,6 @@ def delete_service_template(service_id, template_id): template=get_template( template, current_service, - expand_emails=True, letter_preview_url=url_for( '.view_letter_template_preview', service_id=service_id, @@ -697,7 +694,6 @@ def confirm_redact_template(service_id, template_id): template=get_template( template, current_service, - expand_emails=True, letter_preview_url=url_for( '.view_letter_template_preview', service_id=service_id, @@ -738,7 +734,6 @@ def view_template_versions(service_id, template_id): get_template( template, current_service, - expand_emails=True, letter_preview_url=url_for( '.view_template_version_preview', service_id=service_id, diff --git a/app/utils.py b/app/utils.py index 593856e87..723f29f4f 100644 --- a/app/utils.py +++ b/app/utils.py @@ -343,7 +343,6 @@ def get_template( template, service, show_recipient=False, - expand_emails=False, letter_preview_url=None, page_count=1, redact_missing_personalisation=False,