mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-04-30 22:21:16 -04:00
Merge pull request #464 from alphagov/correct-innacurate-csv-error
Fix innacurate error message on CSV check
This commit is contained in:
@@ -79,9 +79,9 @@ def get_errors_for_csv(recipients, template_type):
|
||||
if recipients.rows_with_missing_data:
|
||||
number_of_rows_with_missing_data = len(list(recipients.rows_with_missing_data))
|
||||
if 1 == number_of_rows_with_missing_data:
|
||||
errors.append("fill in 1 empty cell")
|
||||
errors.append("enter missing data in 1 row")
|
||||
else:
|
||||
errors.append("fill in {} empty cells".format(number_of_rows_with_missing_data))
|
||||
errors.append("enter missing data in {} rows".format(number_of_rows_with_missing_data))
|
||||
|
||||
return errors
|
||||
|
||||
|
||||
@@ -49,7 +49,7 @@ MockRecipients = namedtuple(
|
||||
[
|
||||
'add a column called ‘name’',
|
||||
'fix 1 phone number',
|
||||
'fill in 1 empty cell'
|
||||
'enter missing data in 1 row'
|
||||
]
|
||||
),
|
||||
(
|
||||
@@ -63,7 +63,7 @@ MockRecipients = namedtuple(
|
||||
[
|
||||
'add columns called ‘name’, ‘date’, and ‘time’',
|
||||
'fix 4 phone numbers',
|
||||
'fill in 4 empty cells'
|
||||
'enter missing data in 4 rows'
|
||||
]
|
||||
)
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user