diff --git a/erpnext/manufacturing/doctype/work_order/work_order.py b/erpnext/manufacturing/doctype/work_order/work_order.py index e5746c2fd78..024a631ab11 100644 --- a/erpnext/manufacturing/doctype/work_order/work_order.py +++ b/erpnext/manufacturing/doctype/work_order/work_order.py @@ -791,7 +791,7 @@ class WorkOrder(Document): ) 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] )