mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-23 07:46:23 -04:00
Catch duplicate recipient columns in spreadsheets
If someone has duplicate recipient columns in their file we don’t know which one to use. This commit adds an error message which should help them fix the duplication. This commit doesn’t go to the extra effort to actually show the correct values for duplication in the preview. Don’t think it’s worth the effort/complexity for how infrequently we’ve seen this error. Depends on: - [ ] https://github.com/alphagov/notifications-utils/pull/376
This commit is contained in:
@@ -581,6 +581,7 @@ def check_messages(service_id, template_type, upload_id, row_index=2):
|
||||
data['recipients'].too_many_rows or
|
||||
not data['count_of_recipients'] or
|
||||
not data['recipients'].has_recipient_columns or
|
||||
data['recipients'].duplicate_recipient_column_headers or
|
||||
data['recipients'].missing_column_headers
|
||||
):
|
||||
return render_template('views/check/column-errors.html', **data)
|
||||
|
||||
Reference in New Issue
Block a user