diff --git a/frappe/permissions.py b/frappe/permissions.py index 7fb189064d..5cc853b4b2 100644 --- a/frappe/permissions.py +++ b/frappe/permissions.py @@ -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"):