fix: explicitly check type of form name

This commit is contained in:
Sagar Vora 2025-02-19 12:17:31 +05:30
parent f4062b4d7a
commit eded5eac24

View file

@ -158,6 +158,8 @@ def get_context(context):
# check permissions
if frappe.form_dict.name:
assert isinstance(frappe.form_dict.name, str)
if frappe.session.user == "Guest":
frappe.throw(
_("You need to be logged in to access this {0}.").format(self.doc_type),