From ef734ee850d46ff64084317e9538be598a2b0a34 Mon Sep 17 00:00:00 2001 From: Rohan Date: Fri, 17 Jan 2020 11:45:54 +0530 Subject: [PATCH] fix: handle default value for batch size in BOM operation (#20328) --- erpnext/manufacturing/doctype/bom/bom.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/manufacturing/doctype/bom/bom.py b/erpnext/manufacturing/doctype/bom/bom.py index 6bda802d89..b949a0f984 100644 --- a/erpnext/manufacturing/doctype/bom/bom.py +++ b/erpnext/manufacturing/doctype/bom/bom.py @@ -588,7 +588,7 @@ class BOM(WebsiteGenerator): for d in self.operations: if not d.description: d.description = frappe.db.get_value('Operation', d.operation, 'description') - if not d.batch_size > 0: + if not d.batch_size or d.batch_size <= 0: d.batch_size = 1 def get_list_context(context):