mirror of
https://github.com/GSA/notifications-api.git
synced 2025-12-25 01:41:34 -05:00
Merge pull request #1331 from alphagov/better-missing-personalisation-error
Make missing personalisation error consistent
This commit is contained in:
@@ -31,7 +31,7 @@ def create_content_for_notification(template, personalisation):
|
||||
|
||||
def check_placeholders(template_object):
|
||||
if template_object.missing_data:
|
||||
message = 'Template missing personalisation: {}'.format(", ".join(template_object.missing_data))
|
||||
message = 'Missing personalisation: {}'.format(", ".join(template_object.missing_data))
|
||||
raise BadRequestError(fields=[{'template': message}], message=message)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user