mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-04-04 01:21:19 -04:00
Fix error when file has header rows but no data
Previously the error was saying ‘It needs at least one row of data, and columns called None’.
This commit is contained in:
@@ -38,12 +38,18 @@
|
||||
<h1 class='banner-title' data-module="track-error" data-error-type="No rows" data-error-label="{{ upload_id }}">
|
||||
Your file is missing some rows
|
||||
</h1>
|
||||
<p>
|
||||
It needs at least one row of data, and {{ recipients.missing_column_headers | sort() | formatted_list(
|
||||
prefix='a column called',
|
||||
prefix_plural='columns called'
|
||||
) }}.
|
||||
</p>
|
||||
{% if recipients.missing_column_headers %}
|
||||
<p>
|
||||
It needs at least one row of data, and {{ recipients.missing_column_headers | sort() | formatted_list(
|
||||
prefix='a column called',
|
||||
prefix_plural='columns called'
|
||||
) }}.
|
||||
</p>
|
||||
{% else %}
|
||||
<p>
|
||||
It needs at least one row of data.
|
||||
</p>
|
||||
{% endif %}
|
||||
|
||||
{% elif not recipients.has_recipient_columns %}
|
||||
|
||||
|
||||
@@ -352,6 +352,16 @@ def test_upload_csvfile_with_errors_shows_check_page_with_errors(
|
||||
'Skip to file contents'
|
||||
)
|
||||
),
|
||||
(
|
||||
"""
|
||||
phone number, name
|
||||
""",
|
||||
(
|
||||
'Your file is missing some rows '
|
||||
'It needs at least one row of data. '
|
||||
'Skip to file contents'
|
||||
)
|
||||
),
|
||||
(
|
||||
"+447700900986",
|
||||
(
|
||||
|
||||
Reference in New Issue
Block a user