mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-20 14:29:51 -04:00
Only mandate mandatory address columns
If you miss ‘postcode’ from your file then you get told that you need ‘address_line_1’, ‘address_line_2’, ‘address_line_3’, etc. This is incorrect – the only required address columns are lines 1 and 2, plus the postcode. So this commit corrects the error message to be factually accurate. We had a user report this to Fajer as a bug.
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
|
||||
)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user