mirror of
https://github.com/GSA/notifications-api.git
synced 2026-08-16 20:48:37 -04:00
re-add content_char_count to public GET /notification endpoints
we shouldn't remove stuff from endpoints or we'll break clients
This commit is contained in:
@@ -308,8 +308,13 @@ class NotificationWithPersonalisationSchema(NotificationWithTemplateSchema):
|
||||
renderer=PassThrough()
|
||||
)
|
||||
in_data['body'] = template.replaced
|
||||
if in_data['template']['template_type'] == 'email':
|
||||
template_type = in_data['template']['template_type']
|
||||
if template_type == 'email':
|
||||
in_data['subject'] = template.replaced_subject
|
||||
in_data['content_char_count'] = None
|
||||
else:
|
||||
in_data['content_char_count'] = len(in_data['body'])
|
||||
|
||||
in_data.pop('personalisation', None)
|
||||
in_data['template'].pop('content', None)
|
||||
in_data['template'].pop('subject', None)
|
||||
|
||||
Reference in New Issue
Block a user