diff --git a/app/components/dossiers/individual_form_component/individual_form_component.html.haml b/app/components/dossiers/individual_form_component/individual_form_component.html.haml index 97b91976c..38a5b2b19 100644 --- a/app/components/dossiers/individual_form_component/individual_form_component.html.haml +++ b/app/components/dossiers/individual_form_component/individual_form_component.html.haml @@ -1,4 +1,5 @@ = form_for @dossier, url: update_identite_dossier_path(@dossier), html: { id: 'identite-form', class: "form", "data-controller" => "for-tiers" } do |f| + = f.hidden_field :for_tiers - if for_tiers? .fr-alert.fr-alert--info.fr-mb-2w %p.fr-notice__text diff --git a/app/controllers/users/dossiers_controller.rb b/app/controllers/users/dossiers_controller.rb index 08ecd2f55..c80792af4 100644 --- a/app/controllers/users/dossiers_controller.rb +++ b/app/controllers/users/dossiers_controller.rb @@ -139,7 +139,7 @@ module Users respond_to do |format| format.html format.turbo_stream do - @dossier.update_columns(params.require(:dossier).permit(:for_tiers).to_h) + @dossier.for_tiers = params[:dossier][:for_tiers] end end end