From fb906fbfdb5c8af2ba27bb9c1df6c09dcab574c7 Mon Sep 17 00:00:00 2001 From: Chris Hill-Scott Date: Mon, 17 Oct 2016 10:20:14 +0100 Subject: [PATCH] =?UTF-8?q?Make=20=E2=80=98too=20many=20rows=E2=80=99=20er?= =?UTF-8?q?ror=20actually=20work?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Was using the wrong attribute name on the instance of `RecipientCSV` (needed to match https://github.com/alphagov/notifications-utils/blob/19df1eb4ef061674708fe9807bfedaa507dd7186/notifications_utils/recipients.py#L156 ) The ‘can’t show file contents’ message wasn’t showing up, now it is. --- app/templates/views/check.html | 12 ++++++++---- tests/app/main/views/test_send.py | 2 +- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/app/templates/views/check.html b/app/templates/views/check.html index df6b7886a..a942579e9 100644 --- a/app/templates/views/check.html +++ b/app/templates/views/check.html @@ -15,7 +15,7 @@ {% block maincolumn_content %} - {% if recipients.has_too_many_rows %} + {% if recipients.too_many_rows %}
{% call banner_wrapper(type='dangerous') %} @@ -174,8 +174,7 @@ {% call(item, row_number) list_table( recipients.initial_annotated_rows_with_errors if row_errors and not recipients.missing_column_headers else recipients.initial_annotated_rows, caption=original_file_name, - field_headings=['1'] + recipients.column_headers, - empty_message='Can’t show the contents of this file' + field_headings=['1'] + recipients.column_headers ) %} {{ index_field(item.index + 2) }} {% for column in recipients.column_headers %} @@ -203,7 +202,12 @@ {% endif %} {% endcall %} - {% if count_of_displayed_recipients < count_of_recipients %} + + {% if recipients.too_many_rows %} + + {% elif count_of_displayed_recipients < count_of_recipients %}