diff --git a/app/notifications/rest.py b/app/notifications/rest.py index 233ceb065..c960a6aef 100644 --- a/app/notifications/rest.py +++ b/app/notifications/rest.py @@ -220,8 +220,8 @@ def send_notification(notification_type): ) if notification_type != template.template_type: - raise InvalidRequest("{0} template is not suitable for a {1} notification".format(template.template_type, - notification_type), + raise InvalidRequest("{0} template is not suitable for {1} notification".format(template.template_type, + notification_type), status_code=400) errors = unarchived_template_schema.validate({'archived': template.archived}) diff --git a/tests/app/notifications/rest/test_send_notification.py b/tests/app/notifications/rest/test_send_notification.py index 59aa8754c..2d7cd43ab 100644 --- a/tests/app/notifications/rest/test_send_notification.py +++ b/tests/app/notifications/rest/test_send_notification.py @@ -1024,5 +1024,5 @@ def test_should_error_if_notification_type_does_not_match_template_type( assert response.status_code == 400 json_resp = json.loads(response.get_data(as_text=True)) assert json_resp['result'] == 'error' - assert '{0} template is not suitable for a {1} notification'.format(template_type, notification_type) \ + assert '{0} template is not suitable for {1} notification'.format(template_type, notification_type) \ in json_resp['message']