From 58de759ef49093d66138b8f8c58867e6c29557c4 Mon Sep 17 00:00:00 2001 From: Rebecca Law Date: Mon, 12 Mar 2018 12:44:32 +0000 Subject: [PATCH] Fix bug with inbound message page The get notifications endpoint needs the template_type for search. The inbox page for inbound sms messages was not passing that through, which caused a 400 response. This resolves that by passing the template_type to the api. --- app/main/views/conversation.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/main/views/conversation.py b/app/main/views/conversation.py index 89a10c27a..d3207e649 100644 --- a/app/main/views/conversation.py +++ b/app/main/views/conversation.py @@ -102,7 +102,9 @@ def get_user_number(service_id, notification_id): def get_sms_thread(service_id, user_number): for notification in sorted(( - notification_api_client.get_notifications_for_service(service_id, to=user_number)['notifications'] + + notification_api_client.get_notifications_for_service(service_id, + to=user_number, + template_type='sms')['notifications'] + service_api_client.get_inbound_sms(service_id, user_number=user_number) ), key=lambda notification: notification['created_at']):