From 64dccbab5cac75a5c48424d532528486b739bfe9 Mon Sep 17 00:00:00 2001 From: Paul Chavard Date: Wed, 28 Aug 2019 10:41:30 +0200 Subject: [PATCH] Only rename logo param if it is present --- app/controllers/admin/procedures_controller.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/controllers/admin/procedures_controller.rb b/app/controllers/admin/procedures_controller.rb index be192fc9b..31032bcb5 100644 --- a/app/controllers/admin/procedures_controller.rb +++ b/app/controllers/admin/procedures_controller.rb @@ -286,7 +286,9 @@ class Admin::ProceduresController < AdminController else params.require(:procedure).permit(*editable_params, :duree_conservation_dossiers_dans_ds, :duree_conservation_dossiers_hors_ds, :for_individual, :path) end - permited_params[:logo_active_storage] = permited_params.delete(:logo) + if permited_params[:logo] + permited_params[:logo_active_storage] = permited_params.delete(:logo) + end permited_params end end