mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-02 12:49:01 -04:00
Remove irrelevant stuff from error check pages
If you have errors in your file then there’s stuff you’re not going to see on the page. So this doesn’t need to be in the Jinja templates that are only used when there are errors. Basically the conditional stuff is moving up to the level above these templates.
This commit is contained in:
@@ -450,6 +450,14 @@ def check_messages(service_id, template_type, upload_id):
|
||||
|
||||
data = _check_messages(service_id, template_type, upload_id)
|
||||
|
||||
if (
|
||||
data['recipients'].too_many_rows or
|
||||
not data['count_of_recipients'] or
|
||||
not data['recipients'].has_recipient_columns or
|
||||
data['recipients'].missing_column_headers
|
||||
):
|
||||
return render_template('views/check/column-errors.html', **data)
|
||||
|
||||
if data['row_errors']:
|
||||
return render_template('views/check/row-errors.html', **data)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user