mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-03 04:09:11 +00:00
fix: Remove accidental as_dict in frappe.db.get_all
This commit is contained in:
@@ -62,8 +62,7 @@ def get_category_records(categories):
|
|||||||
"parent_item_group": "All Item Groups",
|
"parent_item_group": "All Item Groups",
|
||||||
"show_in_website": 1
|
"show_in_website": 1
|
||||||
},
|
},
|
||||||
fields=["name", "parent_item_group", "is_group", "image", "route"],
|
fields=["name", "parent_item_group", "is_group", "image", "route"]
|
||||||
as_dict=True
|
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
doctype = frappe.unscrub(category)
|
doctype = frappe.unscrub(category)
|
||||||
@@ -71,7 +70,7 @@ def get_category_records(categories):
|
|||||||
if frappe.get_meta(doctype, cached=True).get_field("image"):
|
if frappe.get_meta(doctype, cached=True).get_field("image"):
|
||||||
fields += ["image"]
|
fields += ["image"]
|
||||||
|
|
||||||
categorical_data[category] = frappe.db.get_all(doctype, fields=fields, as_dict=True)
|
categorical_data[category] = frappe.db.get_all(doctype, fields=fields)
|
||||||
|
|
||||||
return categorical_data
|
return categorical_data
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user