[fix] email digest cache

This commit is contained in:
Rushabh Mehta 2015-10-21 11:13:25 +05:30
parent 95dfc2730b
commit 2c867fdd73

View File

@ -168,7 +168,7 @@ class EmailDigest(Document):
for key in ("income", "expenses_booked", "income_year_to_date", "expense_year_to_date",
"invoiced_amount", "payables", "bank_balance"):
if self.get(key):
cache_key = "email_digest:card:" + key
cache_key = "email_digest:card:{0}:{1}".format(self.company, key)
card = cache.get(cache_key)
if card: