test for NaN in Fiat.__str__
This commit is contained in:
@@ -103,7 +103,7 @@ class Fiat(object):
|
|||||||
return 'Fiat(%s)'% self.__str__()
|
return 'Fiat(%s)'% self.__str__()
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
if self.value is None:
|
if self.value.is_nan():
|
||||||
return _('No Data')
|
return _('No Data')
|
||||||
else:
|
else:
|
||||||
return "{:.2f}".format(self.value) + ' ' + self.ccy
|
return "{:.2f}".format(self.value) + ' ' + self.ccy
|
||||||
|
|||||||
Reference in New Issue
Block a user