fix: Use frappe.safe_eval instead of eval

This commit is contained in:
Suraj Shetty 2021-05-11 10:59:16 +05:30
parent 042118aafd
commit b76ebb3f4b

View File

@ -249,7 +249,7 @@ class EmailDigest(Document):
card = cache.get(cache_key) card = cache.get(cache_key)
if card: if card:
card = eval(card) card = frappe.safe_eval(card)
else: else:
card = frappe._dict(getattr(self, "get_" + key)()) card = frappe._dict(getattr(self, "get_" + key)())