Browse Source

Check if value has 'is_nan' before calling it

Fixes: #4034
3.2.x
Johann Bauer 7 years ago
parent
commit
1451c66a8f
No known key found for this signature in database GPG Key ID: 84F1BF925B1F484D
  1. 2
      lib/util.py

2
lib/util.py

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

Loading…
Cancel
Save