From bfd9526c391bf15d2bf11a4dce946af2c4d821ff Mon Sep 17 00:00:00 2001 From: Kat Date: Fri, 22 Jul 2022 12:42:43 +0100 Subject: [PATCH] check arrangement type from saved scheme if incoming params for it is nil --- app/controllers/schemes_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/schemes_controller.rb b/app/controllers/schemes_controller.rb index 8b8f1fe1e..b7f4d88dc 100644 --- a/app/controllers/schemes_controller.rb +++ b/app/controllers/schemes_controller.rb @@ -178,7 +178,7 @@ private required_params[:managing_organisation_id] = nil end - if required_params[:arrangement_type] == "The same organisation that owns the housing stock" + if required_params[:arrangement_type] == "The same organisation that owns the housing stock" || (required_params[:arrangement_type].blank? && @scheme.arrangement_type_same?) required_params[:managing_organisation_id] = required_params[:owning_organisation_id] || @scheme.owning_organisation_id end