mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-04 18:31:13 -05:00
Bring in changes to template and CSV processing
Functional changes: - adds the blue bar Performance changes - faster CSV processing Depends on: - [ ] https://github.com/alphagov/notifications-utils/pull/47 - [ ] https://github.com/alphagov/notifications-utils/pull/48 Also brings in some breaking changes, which do not affect utils (apart from a weird import).
This commit is contained in:
@@ -240,7 +240,11 @@ def send_notification(notification_type):
|
||||
if errors:
|
||||
raise InvalidRequest(errors, status_code=400)
|
||||
|
||||
template_object = Template(template.__dict__, notification.get('personalisation', {}))
|
||||
template_object = Template(
|
||||
template.__dict__,
|
||||
notification.get('personalisation', {}),
|
||||
renderer=lambda content: content
|
||||
)
|
||||
if template_object.missing_data:
|
||||
message = 'Missing personalisation: {}'.format(", ".join(template_object.missing_data))
|
||||
errors = {'template': [message]}
|
||||
|
||||
Reference in New Issue
Block a user