Update bom.py (#14524)
diff --git a/erpnext/manufacturing/doctype/bom/bom.py b/erpnext/manufacturing/doctype/bom/bom.py
index 060894c..7a2aa8a 100644
--- a/erpnext/manufacturing/doctype/bom/bom.py
+++ b/erpnext/manufacturing/doctype/bom/bom.py
@@ -158,7 +158,7 @@
if not self.buying_price_list:
frappe.throw(_("Please select Price List"))
rate = frappe.db.get_value("Item Price", {"price_list": self.buying_price_list,
- "item_code": arg["item_code"]}, "price_list_rate")
+ "item_code": arg["item_code"]}, "price_list_rate") or 0.0
price_list_currency = frappe.db.get_value("Price List",
self.buying_price_list, "currency")
@@ -652,4 +652,4 @@
bom_list.append(child_bom)
count += 1
- return bom_list
\ No newline at end of file
+ return bom_list