fix: issue with cache.setex
This commit is contained in:
parent
4e96563c92
commit
909995a441
@ -107,7 +107,7 @@ def get_exchange_rate(from_currency, to_currency, transaction_date=None, args=No
|
||||
# expire in 6 hours
|
||||
response.raise_for_status()
|
||||
value = response.json()["result"]
|
||||
cache.setex(key, value, 6 * 60 * 60)
|
||||
cache.setex(name=key, time=21600, value=flt(value))
|
||||
return flt(value)
|
||||
except:
|
||||
frappe.log_error(title="Get Exchange Rate")
|
||||
|
Loading…
Reference in New Issue
Block a user