Merge pull request #1331 from alphagov/better-missing-personalisation-error

Make missing personalisation error consistent
This commit is contained in:
Chris Hill-Scott
2017-10-24 14:46:15 +01:00
committed by GitHub

View File

@@ -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)