fix: revert changes in employee descendants query

This commit is contained in:
Rucha Mahabal 2021-06-29 21:57:27 +05:30
parent aacb649050
commit e179cd9841

View File

@ -477,14 +477,13 @@ def get_employee_emails(employee_list):
return employee_emails
@frappe.whitelist()
def get_children(doctype, parent=None, company=None, is_root=False, is_tree=False, fields=None):
def get_children(doctype, parent=None, company=None, is_root=False, is_tree=False):
filters = [['status', '=', 'Active']]
if company and company != 'All Companies':
filters.append(['company', '=', company])
if not fields:
fields = ['name as value', 'employee_name as title']
fields = ['name as value', 'employee_name as title']
if is_root:
parent = ''