Merge pull request #3341 from alphagov/hide-postage-validation-failed

Don’t show the postage when validation has failed
This commit is contained in:
Chris Hill-Scott
2020-03-03 14:37:14 +00:00
committed by GitHub
2 changed files with 5 additions and 1 deletions

View File

@@ -78,7 +78,10 @@ def view_notification(service_id, notification_id):
page_count = get_page_count_for_letter(notification['template'], values=personalisation)
if notification.get('postage'):
notification['template']['postage'] = notification['postage']
if notification["status"] == "validation-failed":
notification['template']['postage'] = None
else:
notification['template']['postage'] = notification['postage']
template = get_template(
notification['template'],
current_service,