fix: get_doc is not usable on jinja template in notification

This commit is contained in:
Sugesh393 2024-10-15 13:10:45 +05:30
parent 7d19631d85
commit 2e4b83f848

View file

@ -734,11 +734,12 @@ def evaluate_alert(doc: Document, alert, event=None):
def get_context(doc):
Frappe = namedtuple("frappe", ["utils"])
Frappe = namedtuple("frappe", ["frappe"])
frappe = Frappe(frappe=get_safe_globals().get("frappe"))
return {
"doc": doc,
"nowdate": nowdate,
"frappe": Frappe(utils=get_safe_globals().get("frappe").get("utils")),
"frappe": frappe.frappe,
}