diff --git a/forex_python/converter.py b/forex_python/converter.py index bf465d0..567e9f8 100644 --- a/forex_python/converter.py +++ b/forex_python/converter.py @@ -37,8 +37,9 @@ def _decode_rates(self, response, use_decimal=False, date_str=None): decoded_data = json.loads(response.text, use_decimal=True) else: decoded_data = response.json() - # if (date_str and date_str != 'latest' and date_str != decoded_data.get('date')): - # raise RatesNotAvailableError("Currency Rates Source Not Ready") + if (date_str and date_str != 'latest' + and date_str != decoded_data.get('date')): + raise RatesNotAvailableError("Currency Rates Source Not Ready") return decoded_data.get('rates', {}) def _get_decoded_rate(