diff --git a/erpnext/manufacturing/doctype/work_order/work_order.py b/erpnext/manufacturing/doctype/work_order/work_order.py index e5746c2fd787..024a631ab118 100644 --- a/erpnext/manufacturing/doctype/work_order/work_order.py +++ b/erpnext/manufacturing/doctype/work_order/work_order.py @@ -791,7 +791,7 @@ def update_work_order_qty_in_combined_so(self): ) def update_completed_qty_in_material_request(self): - if self.material_request: + if self.material_request and self.material_request_item: frappe.get_doc("Material Request", self.material_request).update_completed_qty( [self.material_request_item] )