fix filter query for get_children tree query (#5655)
This commit is contained in:
parent
70a6c231cc
commit
ff83f97f44
1 changed files with 1 additions and 1 deletions
|
|
@ -38,7 +38,7 @@ def get_all_nodes(doctype, parent, tree_method, **filters):
|
|||
@frappe.whitelist()
|
||||
def get_children(doctype, parent='', **filters):
|
||||
parent_field = 'parent_' + doctype.lower().replace(' ', '_')
|
||||
filters=[['ifnull(`{0}`,'')'.format(parent_field), '=', parent],
|
||||
filters=[['ifnull(`{0}`,"")'.format(parent_field), '=', parent],
|
||||
['docstatus', '<' ,'2']]
|
||||
|
||||
doctype_meta = frappe.get_meta(doctype)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue