fix: get_doc is not usable on jinja template in notification
This commit is contained in:
parent
7d19631d85
commit
2e4b83f848
1 changed files with 3 additions and 2 deletions
|
|
@ -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,
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue