From 4dfff5a2719ed84a24e7d9b54869f274899bb9f6 Mon Sep 17 00:00:00 2001 From: Rohan Date: Fri, 17 Jan 2020 11:46:00 +0530 Subject: [PATCH] fix: handle default value for batch size in BOM operation (#20327) --- 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 98f10059712..3561f3637df 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):