chore: hardcode doctype
This commit is contained in:
		| @@ -689,11 +689,11 @@ def get_children(doctype, parent=None, company=None, is_root=False): | ||||
| 			name as value, | ||||
| 			is_group as expandable | ||||
| 		from | ||||
| 			`tab{doctype}` comp | ||||
| 			`tabCompany` comp | ||||
| 		where | ||||
| 			ifnull(parent_company, "")={parent} | ||||
| 		""".format( | ||||
| 			doctype=doctype, parent=frappe.db.escape(parent) | ||||
| 			parent=frappe.db.escape(parent) | ||||
| 		), | ||||
| 		as_dict=1, | ||||
| 	) | ||||
|   | ||||
| @@ -63,7 +63,7 @@ def get_children(doctype, parent=None, company=None, is_root=False): | ||||
| 	else: | ||||
| 		filters["parent_department"] = parent | ||||
|  | ||||
| 	return frappe.get_all(doctype, fields=fields, filters=filters, order_by="name") | ||||
| 	return frappe.get_all("Department", fields=fields, filters=filters, order_by="name") | ||||
|  | ||||
|  | ||||
| @frappe.whitelist() | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Ankush Menat
					Ankush Menat