From 022b4ae57ca53619b26947166d6ffc9086f4f6dd Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sun, 4 Feb 2007 16:35:42 +0000 Subject: [PATCH] rescued to_date exception when displaying a custom value git-svn-id: http://redmine.rubyforge.org/svn/trunk@237 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/helpers/custom_fields_helper.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/helpers/custom_fields_helper.rb b/app/helpers/custom_fields_helper.rb index e473ccdbe..6a596b89b 100644 --- a/app/helpers/custom_fields_helper.rb +++ b/app/helpers/custom_fields_helper.rb @@ -59,10 +59,10 @@ module CustomFieldsHelper # Return a string used to display a custom value def format_value(value, field_format) - return "" unless value + return "" unless value && !value.empty? case field_format when "date" - value.empty? ? "" : l_date(value.to_date) + begin; l_date(value.to_date); rescue; value end when "bool" l_YesNo(value == "1") else