From 9cd3bbf46f03714318ba1acdbe997e21674cb729 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Turbelin?= Date: Sun, 5 Jan 2025 20:08:10 +0100 Subject: [PATCH] Revert "Use params value only if present" This reverts commit 5cd50b1c1ff66398f470d51fdafacf26663a2730. --- app/controllers/admin/enterprises_controller.rb | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/app/controllers/admin/enterprises_controller.rb b/app/controllers/admin/enterprises_controller.rb index 141c02272a..e5b35473ac 100644 --- a/app/controllers/admin/enterprises_controller.rb +++ b/app/controllers/admin/enterprises_controller.rb @@ -49,11 +49,8 @@ module Admin @object.build_custom_tab if @object.custom_tab.nil? return unless params[:stimulus] - if params[:is_primary_producer].present? - @enterprise.is_primary_producer = params[:is_primary_producer] - end - @enterprise.sells = params[:enterprise_sells] if params[:enterprise_sells].present? - + @enterprise.is_primary_producer = params[:is_primary_producer] + @enterprise.sells = params[:enterprise_sells] render cable_ready: cable_car.morph("#side_menu", partial("admin/shared/side_menu")) .morph("#permalink", partial("admin/enterprises/form/permalink")) end