]> source.dussan.org Git - redmine.git/commitdiff
Fix that unable to update the values of a custom field for time tracking activities...
authorGo MAEDA <maeda@farend.jp>
Fri, 20 Mar 2020 02:25:13 +0000 (02:25 +0000)
committerGo MAEDA <maeda@farend.jp>
Fri, 20 Mar 2020 02:25:13 +0000 (02:25 +0000)
Patch by Thomas Löber.

git-svn-id: http://svn.redmine.org/redmine/trunk@19588 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/controllers/enumerations_controller.rb

index ba99e477c364904ad40097bacb7442643e9b167f..61fabe66ced09cee32ed9320c7d38d20d9dcec48 100644 (file)
@@ -109,7 +109,7 @@ class EnumerationsController < ApplicationController
 
   def enumeration_params
     # can't require enumeration on #new action
-    cf_ids = @enumeration.available_custom_fields.map{|c| c.id.to_s}
+    cf_ids = @enumeration.available_custom_fields.map {|c| c.multiple? ? {c.id.to_s => []} : c.id.to_s}
     params.permit(:enumeration => [:name, :active, :is_default, :position, :custom_field_values => cf_ids])[:enumeration]
   end
 end