mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-19 14:09:20 -04:00
Merge pull request #1525 from alphagov/only-mandate-mandatory-columns
Only mandate mandatory address columns
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import itertools
|
||||
from string import ascii_uppercase
|
||||
|
||||
from orderedset import OrderedSet
|
||||
from contextlib import suppress
|
||||
from zipfile import BadZipFile
|
||||
from xlrd.biffh import XLRDError
|
||||
@@ -445,6 +446,7 @@ def _check_messages(service_id, template_type, upload_id, letters_as_pdf=False):
|
||||
template.template_type == 'letter',
|
||||
not request.args.get('from_test'),
|
||||
)),
|
||||
required_recipient_columns=OrderedSet(recipients.recipient_column_headers) - optional_address_columns
|
||||
)
|
||||
|
||||
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
{% elif not recipients.has_recipient_columns %}
|
||||
|
||||
<h1 class='banner-title' data-module="track-error" data-error-type="Missing recipient columns" data-error-label="{{ upload_id }}">
|
||||
Your file needs {{ recipients.recipient_column_headers | formatted_list(
|
||||
Your file needs {{ required_recipient_columns | formatted_list(
|
||||
prefix='a column called',
|
||||
prefix_plural='columns called'
|
||||
) }}
|
||||
|
||||
Reference in New Issue
Block a user