Merge pull request #38378 from AarDG10/fix-api

fix: add perm check to get_values_for_link_and_dynamic_link_fields
This commit is contained in:
Aarol D'Souza 2026-04-06 08:58:18 +05:30 committed by GitHub
commit 3e25f6c878
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -97,7 +97,8 @@ def get_values_for_link_and_dynamic_link_fields(doc_dict):
doctype = field.options if field.fieldtype == "Link" else doc_dict.get(field.options)
link_doc = frappe.get_doc(doctype, doc_fieldvalue)
link_doc = frappe.get_doc(doctype, doc_fieldvalue, check_permission="read")
link_doc.apply_fieldlevel_read_permissions()
doc_dict.update({field.fieldname: link_doc})