From b1aad20a32fb602dff645354bfec10110c538972 Mon Sep 17 00:00:00 2001 From: natdeanlewissoftwire Date: Tue, 26 Mar 2024 12:05:49 +0000 Subject: [PATCH] feat: make check_collection_period log type specific --- app/controllers/form_controller.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/controllers/form_controller.rb b/app/controllers/form_controller.rb index 2bf7ce966..635dc12e4 100644 --- a/app/controllers/form_controller.rb +++ b/app/controllers/form_controller.rb @@ -250,7 +250,9 @@ private def check_collection_period return unless @log - redirect_to lettings_log_path(@log) unless @log.collection_period_open_for_editing? + unless @log.collection_period_open_for_editing? + redirect_to @log.lettings? ? lettings_log_path(@log) : sales_log_path(@log) + end end CONFIRMATION_PAGE_IDS = %w[uprn_confirmation uprn_selection].freeze