fix: add perm check to get_values_for_link_and_dynamic_link_fields

This commit is contained in:
AarDG10 2026-04-01 17:32:35 +05:30
parent 56d251527f
commit 8d898a4ebc

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) 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}) doc_dict.update({field.fieldname: link_doc})