summaryrefslogtreecommitdiffstats
path: root/lib/plugins
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2014-01-25 12:08:22 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2014-01-25 12:08:22 +0000
commit5faa1a4e6ed934e026a58a87de1e3f407ea99c97 (patch)
tree4fa583cebaf3436578c8609b78c473ed336437a5 /lib/plugins
parent20ff37ef42dbc95258209655e611de34538e505f (diff)
downloadredmine-5faa1a4e6ed934e026a58a87de1e3f407ea99c97.tar.gz
redmine-5faa1a4e6ed934e026a58a87de1e3f407ea99c97.zip
REST API: Integer custom field validation fails when using non-string values (#15929).
git-svn-id: http://svn.redmine.org/redmine/trunk@12704 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'lib/plugins')
-rw-r--r--lib/plugins/acts_as_customizable/lib/acts_as_customizable.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/plugins/acts_as_customizable/lib/acts_as_customizable.rb b/lib/plugins/acts_as_customizable/lib/acts_as_customizable.rb
index 3575cc550..b4863f731 100644
--- a/lib/plugins/acts_as_customizable/lib/acts_as_customizable.rb
+++ b/lib/plugins/acts_as_customizable/lib/acts_as_customizable.rb
@@ -72,10 +72,12 @@ module Redmine
if values.has_key?(key)
value = values[key]
if value.is_a?(Array)
- value = value.reject(&:blank?).uniq
+ value = value.reject(&:blank?).map(&:to_s).uniq
if value.empty?
value << ''
end
+ else
+ value = value.to_s
end
custom_field_value.value = value
end