fix: Purposes not set
diff --git a/erpnext/maintenance/doctype/maintenance_schedule/maintenance_schedule.py b/erpnext/maintenance/doctype/maintenance_schedule/maintenance_schedule.py
index 09d4429..3dc6b0f 100644
--- a/erpnext/maintenance/doctype/maintenance_schedule/maintenance_schedule.py
+++ b/erpnext/maintenance/doctype/maintenance_schedule/maintenance_schedule.py
@@ -415,7 +415,7 @@
 			},
 			"Maintenance Schedule Item": {
 				"doctype": "Maintenance Visit Purpose",
-				"condition": lambda doc: doc.item_name == item_name,
+				"condition": lambda doc: doc.item_name == item_name if item_name else True,
 				"field_map": {"sales_person": "service_person"},
 				"postprocess": update_serial,
 			},