Fix non-current date problem in exchange rates

master
Nikola Forró 6 years ago
parent 67ec9d4b60
commit d9bbbe6885

@ -22,7 +22,7 @@ class ExchangeRates(object):
try:
data = requests.get(API_URL).json()
base, rates = data['base'], data['rates']
self.cache[data['date']] = base, rates
self.cache[today] = base, rates
except Exception as e:
raise ExchangeRatesError(str(e))
return base, rates

Loading…
Cancel
Save