From c59e0091eeb4c51a93cc8c2189d87b659aef7566 Mon Sep 17 00:00:00 2001 From: Katie Smith Date: Tue, 16 Feb 2021 13:23:05 +0000 Subject: [PATCH] Stop emailing Notify when an MOU is signed We've decided we don't get any value from these emails any more, so this stops us (Notify support) receiving them. We still let teams know an MOU has been signed. --- app/config.py | 1 - app/organisation/rest.py | 7 ------- tests/app/conftest.py | 1 - tests/app/organisation/test_rest.py | 2 -- 4 files changed, 11 deletions(-) diff --git a/app/config.py b/app/config.py index f3de3baaf..37c4602da 100644 --- a/app/config.py +++ b/app/config.py @@ -178,7 +178,6 @@ class Config(object): MOU_SIGNER_RECEIPT_TEMPLATE_ID = '4fd2e43c-309b-4e50-8fb8-1955852d9d71' MOU_SIGNED_ON_BEHALF_SIGNER_RECEIPT_TEMPLATE_ID = 'c20206d5-bf03-4002-9a90-37d5032d9e84' MOU_SIGNED_ON_BEHALF_ON_BEHALF_RECEIPT_TEMPLATE_ID = '522b6657-5ca5-4368-a294-6b527703bd0b' - MOU_NOTIFY_TEAM_ALERT_TEMPLATE_ID = 'd0e66c4c-0c50-43f0-94f5-f85b613202d4' NOTIFY_INTERNATIONAL_SMS_SENDER = '07984404008' BROKER_URL = 'sqs://' diff --git a/app/organisation/rest.py b/app/organisation/rest.py index f544be041..9c7c9f4a5 100644 --- a/app/organisation/rest.py +++ b/app/organisation/rest.py @@ -208,13 +208,6 @@ def send_notifications_on_mou_signed(organisation_id): 'on_behalf_of_name': organisation.agreement_signed_on_behalf_of_name } - # let notify team know something's happened - _send_notification( - current_app.config['MOU_NOTIFY_TEAM_ALERT_TEMPLATE_ID'], - 'notify-support+{}@digital.cabinet-office.gov.uk'.format(current_app.config['NOTIFY_ENVIRONMENT']), - personalisation - ) - if not organisation.agreement_signed_on_behalf_of_email_address: signer_template_id = 'MOU_SIGNER_RECEIPT_TEMPLATE_ID' else: diff --git a/tests/app/conftest.py b/tests/app/conftest.py index ce91c2e5a..4099d65af 100644 --- a/tests/app/conftest.py +++ b/tests/app/conftest.py @@ -795,7 +795,6 @@ def mou_signed_templates(notify_db, notify_db_session): 'MOU_SIGNER_RECEIPT_TEMPLATE_ID', 'MOU_SIGNED_ON_BEHALF_SIGNER_RECEIPT_TEMPLATE_ID', 'MOU_SIGNED_ON_BEHALF_ON_BEHALF_RECEIPT_TEMPLATE_ID', - 'MOU_NOTIFY_TEAM_ALERT_TEMPLATE_ID', ] } diff --git a/tests/app/organisation/test_rest.py b/tests/app/organisation/test_rest.py index 2fb52d338..94a2e73eb 100644 --- a/tests/app/organisation/test_rest.py +++ b/tests/app/organisation/test_rest.py @@ -442,7 +442,6 @@ def test_post_update_organisation_set_mou_doesnt_email_if_no_signed_by( None, None, { - 'MOU_NOTIFY_TEAM_ALERT_TEMPLATE_ID': 'notify-support+test@digital.cabinet-office.gov.uk', 'MOU_SIGNER_RECEIPT_TEMPLATE_ID': 'notify@digital.cabinet-office.gov.uk', } ), @@ -450,7 +449,6 @@ def test_post_update_organisation_set_mou_doesnt_email_if_no_signed_by( 'Important Person', 'important@person.com', { - 'MOU_NOTIFY_TEAM_ALERT_TEMPLATE_ID': 'notify-support+test@digital.cabinet-office.gov.uk', 'MOU_SIGNED_ON_BEHALF_ON_BEHALF_RECEIPT_TEMPLATE_ID': 'important@person.com', 'MOU_SIGNED_ON_BEHALF_SIGNER_RECEIPT_TEMPLATE_ID': 'notify@digital.cabinet-office.gov.uk', }