diff --git a/services/exchangerates.py b/services/exchangerates.py index e5d672c..c9e5a05 100644 --- a/services/exchangerates.py +++ b/services/exchangerates.py @@ -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