diff --git a/erpnext/manufacturing/doctype/production_plan/services/planning_queries.py b/erpnext/manufacturing/doctype/production_plan/services/planning_queries.py index 87ccdd2b5c7..615d840f08a 100644 --- a/erpnext/manufacturing/doctype/production_plan/services/planning_queries.py +++ b/erpnext/manufacturing/doctype/production_plan/services/planning_queries.py @@ -24,8 +24,7 @@ def get_bin_details( ): frappe.has_permission("Production Plan", "read", throw=True) - if isinstance(row, str): - row = frappe._dict(json.loads(row)) + row = frappe._dict(frappe.parse_json(row)) bin = frappe.qb.DocType("Bin") subquery = _bin_warehouse_subquery(bin, company, row, for_warehouse, all_warehouse) @@ -65,8 +64,7 @@ def _bin_qty_columns(bin): def get_warehouse_list(warehouses): warehouse_list = [] - if isinstance(warehouses, str): - warehouses = json.loads(warehouses) + warehouses = frappe.parse_json(warehouses) for row in warehouses: child_warehouses = frappe.db.get_descendants("Warehouse", row.get("warehouse"))