diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2014-05-24 10:12:40 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2014-05-24 10:12:40 +0000 |
commit | c74925d4afdfd20ef5920ea08a28f09f45b9026d (patch) | |
tree | ef767f9ff59bc76057dcb0b95d8cc12bdbd91cd1 /lib/redmine | |
parent | 1fd5346c3c6069e1648ccab363e25aa8e917fb5f (diff) | |
download | redmine-c74925d4afdfd20ef5920ea08a28f09f45b9026d.tar.gz redmine-c74925d4afdfd20ef5920ea08a28f09f45b9026d.zip |
Fixed that custom field referencing deleted value trigger an error on display (#16926).
git-svn-id: http://svn.redmine.org/redmine/trunk@13141 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'lib/redmine')
-rw-r--r-- | lib/redmine/field_format.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/redmine/field_format.rb b/lib/redmine/field_format.rb index 3b567a0b8..655e2c984 100644 --- a/lib/redmine/field_format.rb +++ b/lib/redmine/field_format.rb @@ -98,9 +98,10 @@ module Redmine if value.blank? nil elsif value.is_a?(Array) - value.map do |v| + casted = value.map do |v| cast_single_value(custom_field, v, customized) - end.sort + end + casted.compact.sort else cast_single_value(custom_field, value, customized) end |