From 7129231dbbcd40ba6389a59eba371c5163ec5f34 Mon Sep 17 00:00:00 2001 From: Saif Ur Rehman Date: Thu, 30 May 2019 13:55:32 +0500 Subject: [PATCH] fix(Product Bundle Balance): Update frappe.db.escape for v12 --- .../report/product_bundle_balance/product_bundle_balance.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/stock/report/product_bundle_balance/product_bundle_balance.py b/erpnext/stock/report/product_bundle_balance/product_bundle_balance.py index 39b20e0ed0..276e42ee43 100644 --- a/erpnext/stock/report/product_bundle_balance/product_bundle_balance.py +++ b/erpnext/stock/report/product_bundle_balance/product_bundle_balance.py @@ -141,7 +141,7 @@ def get_stock_ledger_entries(filters, items): return [] item_conditions_sql = ' and sle.item_code in ({})' \ - .format(', '.join(['"' + frappe.db.escape(i, percent=False) + '"' for i in items])) + .format(', '.join([frappe.db.escape(i) for i in items])) conditions = get_sle_conditions(filters) @@ -176,7 +176,7 @@ def get_sle_conditions(filters): if not filters.get("date"): frappe.throw(_("'Date' is required")) - conditions += " and sle.posting_date <= '%s'" % frappe.db.escape(filters.get("date")) + conditions += " and sle.posting_date <= %s" % frappe.db.escape(filters.get("date")) if filters.get("warehouse"): warehouse_details = frappe.db.get_value("Warehouse", filters.get("warehouse"), ["lft", "rgt"], as_dict=1)