Revert "Use params value only if present"

This reverts commit 5cd50b1c1ff66398f470d51fdafacf26663a2730.
This commit is contained in:
François Turbelin
2025-01-05 20:08:10 +01:00
committed by Rachel Arnould
parent f9f5d0eb51
commit 9cd3bbf46f

View File

@@ -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