fix: has_permission check on int pk
This commit is contained in:
parent
b41d4905c0
commit
ada2e20af3
1 changed files with 1 additions and 1 deletions
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue