mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-03 12:19:12 +00:00
Undo replace of frappe.db.sql with frappe.get_list (#14074)
This commit is contained in:
committed by
Faris Ansari
parent
265005d30d
commit
fbb6b3da5f
@@ -169,10 +169,11 @@ def get_children(doctype, parent, is_root=False):
|
||||
if is_root:
|
||||
parent = ''
|
||||
|
||||
land_units = frappe.get_list(doctype,
|
||||
fields = ['name as value', 'is_group as expandable'],
|
||||
filters= [['parent_land_unit', '=', parent]],
|
||||
order_by='name')
|
||||
land_units = frappe.db.sql("""select name as value,
|
||||
is_group as expandable
|
||||
from `tabLand Unit`
|
||||
where ifnull(`parent_land_unit`,'') = %s
|
||||
order by name""", (parent), as_dict=1)
|
||||
|
||||
# return nodes
|
||||
return land_units
|
||||
|
||||
Reference in New Issue
Block a user