fix: use get_list to only fetch permitted records

This commit is contained in:
Sumit Bhanushali 2025-10-27 13:27:13 +05:30
parent f5fed5b4be
commit 8955f079a1

View file

@ -2804,7 +2804,7 @@ def attach_expanded_links(doctype: str, docs: list, fields_to_expand: list):
doctype_title_maps = {}
for link_doctype, values in doctype_values.items():
records = frappe.get_all(
records = frappe.get_list(
link_doctype,
filters={"name": ["in", list(values)]},
fields=["*"],