fix: travis failing

This commit is contained in:
Rohit Waghchaure
2019-12-06 12:37:24 +05:30
parent cfbf895876
commit d98ed8047a
3 changed files with 15 additions and 3 deletions

View File

@@ -106,7 +106,8 @@ def get_exchange_rate(from_currency, to_currency, transaction_date=None, args=No
# expire in 6 hours
response.raise_for_status()
value = response.json()["rates"][to_currency]
cache.setex(key, value, 6 * 60 * 60)
cache.set_value(key, value, expires_in_sec=6 * 60 * 60)
return flt(value)
except:
frappe.log_error(title="Get Exchange Rate")