rescued to_date exception when displaying a custom value

git-svn-id: http://redmine.rubyforge.org/svn/trunk@237 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang 2007-02-04 16:35:42 +00:00
parent d185e2f9e0
commit 022b4ae57c
1 changed files with 2 additions and 2 deletions

View File

@ -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