mirror of
https://github.com/frappe/erpnext.git
synced 2026-08-23 03:10:04 +00:00
refactor(queries): using frappe.get_query in get_filtered_child_rows (#57991)
This commit is contained in:
@@ -1133,9 +1133,8 @@ def get_filtered_child_rows(
|
||||
):
|
||||
table = frappe.qb.DocType(doctype)
|
||||
query = (
|
||||
frappe.qb.from_(table)
|
||||
frappe.get_query(table, filters=filters)
|
||||
.select(
|
||||
table.name,
|
||||
Concat("#", table.idx, ", ", table.item_code),
|
||||
)
|
||||
.orderby(table.idx)
|
||||
@@ -1143,10 +1142,6 @@ def get_filtered_child_rows(
|
||||
.limit(page_len)
|
||||
)
|
||||
|
||||
if filters:
|
||||
for field, value in filters.items():
|
||||
query = query.where(table[field] == value)
|
||||
|
||||
if txt:
|
||||
txt += "%"
|
||||
query = query.where(
|
||||
|
||||
Reference in New Issue
Block a user