From 368da49469a0ee72a25903f4ccf6b8d1ace1c961 Mon Sep 17 00:00:00 2001 From: Athanasios Voutsadakis Date: Fri, 4 Aug 2017 15:59:54 +0100 Subject: [PATCH] Temporary test fix This should be removed when the SES endpoint is removed --- app/notifications/notifications_ses_callback.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/notifications/notifications_ses_callback.py b/app/notifications/notifications_ses_callback.py index 6d3c2807e..45053d615 100644 --- a/app/notifications/notifications_ses_callback.py +++ b/app/notifications/notifications_ses_callback.py @@ -37,6 +37,11 @@ def sns_callback_handler(): def process_ses_response(ses_request): client_name = 'SES' try: + + # TODO: remove this check once the sns_callback_handler is removed + if not isinstance(ses_request, dict): + ses_request = json.loads(ses_request) + errors = validate_callback_data(data=ses_request, fields=['Message'], client_name=client_name) if errors: return errors, 400, {}