fix: get_email_header

This commit is contained in:
Faris Ansari 2019-10-21 12:48:41 +05:30
parent 0f02f1df4c
commit e9b7256992

View file

@ -77,12 +77,14 @@ def send_notification_email(doc):
)
def get_email_header(doc):
if doc.type == 'Mention' or doc.type == 'Assignment':
return _('New {0}').format(doc.type)
elif doc.type == 'Share':
return _('New Document Shared')
elif doc.type == 'Energy Point':
return _('Energy Point Update')
return {
'Default': _('New Notification'),
'Mention': _('New Mention'),
'Assignment': _('New Assignment'),
'Share': _('New Document Shared'),
'Energy Point': _('Energy Point Update'),
}[doc.type or 'Default']
@frappe.whitelist()
def mark_as_seen(docnames):