fix: has_permission check on int pk

This commit is contained in:
Ankush Menat 2023-07-31 16:42:31 +05:30
parent b41d4905c0
commit ada2e20af3

View file

@ -89,7 +89,7 @@ def has_permission(
meta = frappe.get_meta(doctype)
if doc:
if isinstance(doc, str):
if isinstance(doc, (str, int)):
doc = frappe.get_doc(meta.name, doc)
perm = get_doc_permissions(doc, user=user, ptype=ptype).get(ptype)
if not perm: