if value should be float but is not, show 'Non applicable'
This commit is contained in:
parent
69fb738818
commit
4a6b6e0471
|
@ -106,7 +106,10 @@ class CubeMixin(object):
|
|||
for cell, value in row:
|
||||
if stringify and cell.type is float:
|
||||
# FIXME find how to format decimal number using locale with Django
|
||||
value = ('%05.2f' % float(value)).replace('.', ',') + u' %'
|
||||
try:
|
||||
value = ('%05.2f' % float(value)).replace('.', ',') + u' %'
|
||||
except:
|
||||
value = _('Non applicable')
|
||||
if isinstance(value, datetime.timedelta):
|
||||
if stringify:
|
||||
s = ''
|
||||
|
|
Loading…
Reference in New Issue