From d9bbbe688588fccfd65c4ce9f75cb458b13eaf99 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nikola=20Forr=C3=B3?= Date: Tue, 30 Apr 2019 19:44:39 +0200 Subject: [PATCH] Fix non-current date problem in exchange rates --- services/exchangerates.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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