Look at body, not template in outbound texts

As of this PR we don’t return the template content any more:
https://github.com/alphagov/notifications-api/pull/1015
This commit is contained in:
Chris Hill-Scott
2017-06-14 17:44:50 +01:00
parent cebfa6cff6
commit 7e8471f21f
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -46,7 +46,7 @@ def get_sms_thread(service_id, user_number):
'inbound': is_inbound, 'inbound': is_inbound,
'content': SMSPreviewTemplate( 'content': SMSPreviewTemplate(
{ {
'content': notification.get('content') or notification['template']['content'] 'content': notification.get('content') or notification['body']
}, },
downgrade_non_gsm_characters=(not is_inbound) downgrade_non_gsm_characters=(not is_inbound)
), ),
+1 -1
View File
@@ -249,8 +249,8 @@ def notification_json(
'id': template['id'], 'id': template['id'],
'name': template['name'], 'name': template['name'],
'template_type': template['template_type'], 'template_type': template['template_type'],
'content': template['content'],
}, },
'body': template['content'],
'job': job_payload, 'job': job_payload,
'sent_at': sent_at, 'sent_at': sent_at,
'status': status, 'status': status,