fix: handle default value for batch size in BOM operation (#20327)

This commit is contained in:
Rohan
2020-01-17 11:46:00 +05:30
committed by Nabin Hait
parent c2b9598966
commit 4dfff5a271

View File

@@ -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):