fix(query): always alias the table when used in joins

This commit is contained in:
AarDG10 2026-04-28 17:51:23 +05:30
parent 8df5ca026b
commit fd2661160e

View file

@ -2079,7 +2079,6 @@ class LinkTableField(DynamicTableField):
def _get_joined_table(self):
table = frappe.qb.DocType(self.doctype)
if self.doctype == self.parent_doctype:
table = table.as_(f"tab{self.doctype}_{self.link_fieldname}")
return table