From 33688b92c5711e8e321b5877ad2d02c66efa111d Mon Sep 17 00:00:00 2001 From: Chris Hill-Scott Date: Thu, 20 Aug 2020 10:08:33 +0100 Subject: [PATCH] Remove reference to end time for approver MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Messages awaiting approval don’t have an end time – it’s set automatically once the message is approved. We need to revisit the content on this page, but this is just a fix so that the page doesn’t `500`. --- app/templates/views/broadcast/view-message.html | 2 +- tests/app/main/views/test_broadcast.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/templates/views/broadcast/view-message.html b/app/templates/views/broadcast/view-message.html index 12a89141a..45ddcd714 100644 --- a/app/templates/views/broadcast/view-message.html +++ b/app/templates/views/broadcast/view-message.html @@ -30,7 +30,7 @@ {% call form_wrapper(class="banner govuk-!-margin-bottom-6") %}

{{ broadcast_message.created_by.name }} wants to broadcast this - message until {{ broadcast_message.finishes_at|format_datetime_relative }}. + message.

{{ page_footer( "Start broadcasting now", diff --git a/tests/app/main/views/test_broadcast.py b/tests/app/main/views/test_broadcast.py index 1619b0192..8722a1f54 100644 --- a/tests/app/main/views/test_broadcast.py +++ b/tests/app/main/views/test_broadcast.py @@ -687,7 +687,7 @@ def test_view_pending_broadcast( service_id=SERVICE_ONE_ID, template_id=fake_uuid, created_by_id=fake_uuid, - finishes_at='2020-02-23T23:23:23.000000', + finishes_at=None, status='pending-approval', ), ) @@ -706,7 +706,7 @@ def test_view_pending_broadcast( assert ( normalize_spaces(page.select_one('.banner').text) ) == ( - 'Test User wants to broadcast this message until tomorrow at 11:23pm. ' + 'Test User wants to broadcast this message. ' 'Start broadcasting now Reject this broadcast' )