refactor: using get_all instead of get_list

This commit is contained in:
noahjacob 2021-05-19 13:51:36 +05:30
parent 3768216dca
commit 8e34c49ac9

View File

@ -217,7 +217,7 @@ def item_query(doctype, txt, searchfield, start, page_len, filters, as_dict=Fals
searchfields = " or ".join([field + " like %(txt)s" for field in searchfields])
if filters.get('supplier'):
item_group_list = frappe.get_list('Supplier Item Group', filters = {'supplier': filters.get('supplier')}, fields = ['item_group'])
item_group_list = frappe.get_all('Supplier Item Group', filters = {'supplier': filters.get('supplier')}, fields = ['item_group'])
item_groups = []
for i in item_group_list: