From 7d2587c0a9b2ab30ab45bbc9c2af40b1f2ade1fb Mon Sep 17 00:00:00 2001 From: Ankush Menat Date: Sun, 24 Apr 2022 19:26:15 +0530 Subject: [PATCH] fix: nullish check and table name --- erpnext/manufacturing/doctype/bom/bom.py | 2 +- erpnext/stock/doctype/item_price/item_price.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/manufacturing/doctype/bom/bom.py b/erpnext/manufacturing/doctype/bom/bom.py index fefb2e59f0..220ce1dbd8 100644 --- a/erpnext/manufacturing/doctype/bom/bom.py +++ b/erpnext/manufacturing/doctype/bom/bom.py @@ -753,7 +753,7 @@ class BOM(WebsiteGenerator): bom_item.include_item_in_manufacturing, bom_item.sourced_by_supplier, bom_item.stock_qty / ifnull(bom.quantity, 1) AS qty_consumed_per_unit - FROM `tabBOM Explosion Item` bom_item, tabBOM bom + FROM `tabBOM Explosion Item` bom_item, `tabBOM` bom WHERE bom_item.parent = bom.name AND bom.name = %s diff --git a/erpnext/stock/doctype/item_price/item_price.py b/erpnext/stock/doctype/item_price/item_price.py index 562f7b9e12..ab797cd039 100644 --- a/erpnext/stock/doctype/item_price/item_price.py +++ b/erpnext/stock/doctype/item_price/item_price.py @@ -64,7 +64,7 @@ class ItemPrice(Document): if self.get(field): conditions += " and {0} = %({0})s ".format(field) else: - conditions += "and (isnull({0}) or {0} = '')".format(field) + conditions += "and ({0} is null or {0} = '')".format(field) price_list_rate = frappe.db.sql( """