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:
parent
d185e2f9e0
commit
022b4ae57c
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue