Merge pull request #32751 from iamejaaz/39801-handle-none-doc-name
fix: permission error when permission docname is none
This commit is contained in:
commit
fd4bb5a426
1 changed files with 1 additions and 1 deletions
|
|
@ -351,7 +351,7 @@ def has_user_permission(doc, user=None, debug=False):
|
|||
# if allowed_docs is empty it states that there is no applicable permission under the current doctype
|
||||
|
||||
# only check if allowed_docs is not empty
|
||||
if allowed_docs and str(docname) not in allowed_docs:
|
||||
if allowed_docs and docname and str(docname) not in allowed_docs:
|
||||
# no user permissions for this doc specified
|
||||
debug and _debug_log(
|
||||
"User doesn't have access to this document because of User Permissions, allowed documents: "
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue