panosl / django-currencies

django-currencies allows you to define different currencies, and includes template tags/filters to allow easy conversion between them.
http://pypi.python.org/pypi/django-currencies
BSD 3-Clause "New" or "Revised" License
94 stars 81 forks source link

Fix decimal type in datetime.fromtimestamp #96

Open RuVl opened 1 year ago

RuVl commented 1 year ago

python ./manage.py updatecurrencies oxr raise TypeError: 'decimal.Decimal' object cannot be interpreted as an integer on file: \venv\lib\site-packages\currencies\management\commands_openexchangerates.py", line 84, in get_ratetimestamp return datetime.fromtimestamp(self.rates["timestamp"])

I fix this by replacing self.rates["timestamp"] to float(self.rates["timestamp"])