mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-11 09:28:27 -04:00
Don’t show the postage when validation has failed
The postage covers up some of the letter, so it can hide the problem. It also implies that the letter has been put in an envelope, which will never happen if it fails validation. This matches what we do for uploaded letters.
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user