fix(permissions): cast docname to string
Extension of #24988 Signed-off-by: Akhil Narang <me@akhilnarang.dev>
This commit is contained in:
parent
8d6f8bce01
commit
d47057cbef
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