fix(linked_with): don't add tab prefix

query builder takes care of this

Signed-off-by: Akhil Narang <me@akhilnarang.dev>
This commit is contained in:
Akhil Narang 2025-11-12 14:08:59 +05:30
parent 0ea49a8f1e
commit df5080b45e
No known key found for this signature in database
GPG key ID: 9DCC61E211BF645F

View file

@ -457,7 +457,7 @@ def get_linked_docs(doctype: str, name: str, linkinfo: dict | None = None) -> di
if add_fields := link_context.get("add_fields"):
fields += add_fields
fields = [f"`tab{linked_doctype}`.`{sf.strip()}`" for sf in fields if sf and "`tab" not in sf]
fields = [sf.strip() for sf in fields if sf]
if filters_ctx := link_context.get("filters"):
ret = frappe.get_list(doctype=linked_doctype, fields=fields, filters=filters_ctx, order_by=None)