1
0

Check if value has 'is_nan' before calling it

Fixes: #4034
This commit is contained in:
Johann Bauer
2018-03-05 23:07:52 +01:00
parent 2bde686752
commit 1451c66a8f

View File

@@ -113,7 +113,7 @@ class Fiat(object):
return 'Fiat(%s)'% self.__str__()
def __str__(self):
if self.value.is_nan():
if hasattr(self.value, 'is_nan') and self.value.is_nan():
return _('No Data')
else:
return "{:.2f}".format(self.value) + ' ' + self.ccy