fix: Handle case where document title can be NONE

(cherry picked from commit 9b67fc24bc290789158f37a8f2ce10b505878792)
This commit is contained in:
Suraj Shetty 2022-06-13 11:11:47 +05:30 committed by Mergify
parent 66deca1530
commit a4f2912fdf

View file

@ -63,7 +63,7 @@ def get_context(context):
"body": body,
"print_style": print_style,
"comment": frappe.session.user,
"title": frappe.utils.strip_html(doc.get_title()),
"title": frappe.utils.strip_html(doc.get_title() or doc.name),
"lang": frappe.local.lang,
"layout_direction": "rtl" if is_rtl() else "ltr",
"doctype": frappe.form_dict.doctype,