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

@@ -283,7 +283,7 @@ class EmailDigest(Document):
card.value = card.value *-1
card.value = self.fmt_money(card.value,False if key in ("bank_balance", "credit_balance") else True)
cache.setex(cache_key, card, 24 * 60 * 60)
cache.set_value(cache_key, card, expires_in_sec=24 * 60 * 60)
context.cards.append(card)

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")