Merge pull request #28225 from akhilnarang/permission-doctype-string-cast
fix(permissions): cast docname to string
This commit is contained in:
commit
b3d9188d08
1 changed files with 1 additions and 1 deletions
|
|
@ -388,7 +388,7 @@ def has_user_permission(doc, user=None, debug=False):
|
|||
# get the list of all allowed values for this link
|
||||
allowed_docs = get_allowed_docs_for_doctype(user_permissions.get(field.options, []), doctype)
|
||||
|
||||
if allowed_docs and d.get(field.fieldname) not in allowed_docs:
|
||||
if allowed_docs and str(d.get(field.fieldname)) not in allowed_docs:
|
||||
# restricted for this link field, and no matching values found
|
||||
# make the right message and exit
|
||||
if d.get("parentfield"):
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue