diff --git a/frappe/database.py b/frappe/database.py index 3df1fc6c12..d4d19908a9 100644 --- a/frappe/database.py +++ b/frappe/database.py @@ -457,6 +457,7 @@ class Database: """Return the temperory value and delete it.""" value = self.get_global(key, "__temp") frappe.defaults.clear_default(key=key, parent="__temp") + return value def set_global(self, key, val, user='__global'): """Save a global key value. Global values will be automatically set if they match fieldname.""" diff --git a/frappe/email/doctype/email_alert/email_alert.py b/frappe/email/doctype/email_alert/email_alert.py index ea5021db8b..6591f17b32 100644 --- a/frappe/email/doctype/email_alert/email_alert.py +++ b/frappe/email/doctype/email_alert/email_alert.py @@ -89,15 +89,7 @@ def evaluate_alert(doc, alert, event): if not recipients: return - template = alert.message + footer # send alert frappe.sendmail(recipients=recipients, subject=alert.subject, message= frappe.render_template(template, {"doc": doc, "alert":alert}), bulk=True, ref_doctype = doc.doctype, ref_docname = doc.name) - - -footer = """