diff --git a/currencies/management/commands/_openexchangerates.py b/currencies/management/commands/_openexchangerates.py index 8fa4805..493e5f6 100644 --- a/currencies/management/commands/_openexchangerates.py +++ b/currencies/management/commands/_openexchangerates.py @@ -81,7 +81,7 @@ def get_ratetimestamp(self, base, code): """Return rate timestamp as a datetime/date or None""" self.get_latestcurrencyrates(base) try: - return datetime.fromtimestamp(self.rates["timestamp"]) + return datetime.fromtimestamp(float(self.rates["timestamp"])) except KeyError: return None