Update email_digest.py (#15144)

This commit is contained in:
Benji 2018-08-23 00:27:51 +08:00 committed by Rushabh Mehta
parent 6ad16db88c
commit 363dd2773e

View File

@ -135,7 +135,7 @@ class EmailDigest(Document):
notifications = frappe.desk.notifications.get_notifications()
notifications = sorted(notifications.get("open_count_doctype", {}).items(),
lambda a, b: 1 if a[1] < b[1] else -1)
key=lambda a: a[1])
notifications = [{"key": n[0], "value": n[1],
"link": get_url_to_list(n[0])} for n in notifications if n[1]]