This commit is contained in:
Edward Betts 2024-08-04 16:17:52 +01:00
parent b5188771be
commit bd129aea5c

View file

@ -85,7 +85,7 @@ def get_rates(config: flask.config.Config) -> dict[str, Decimal]:
delta = now - recent
full_path = os.path.join(fx_dir, recent_filename)
if not recent_filename.endswith(file_suffix) or delta < timedelta(hours=12):
if recent_filename.endswith(file_suffix) and delta < timedelta(hours=12):
return read_cached_rates(full_path, currencies)
url = "http://api.exchangerate.host/live"