From c74925d4afdfd20ef5920ea08a28f09f45b9026d Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sat, 24 May 2014 10:12:40 +0000 Subject: 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 --- lib/redmine/field_format.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'lib/redmine') 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 -- cgit v1.2.3