From 55bb6e0357fe7e746d5db19dcee3092c4cbeee7e Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Tue, 19 May 2026 21:08:47 +0530 Subject: [PATCH] fix: handle None delivery_date when sorting MPS data (#55028) --- .../master_production_schedule/master_production_schedule.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/manufacturing/doctype/master_production_schedule/master_production_schedule.py b/erpnext/manufacturing/doctype/master_production_schedule/master_production_schedule.py index ee5b1b96abe..48e04ebf050 100644 --- a/erpnext/manufacturing/doctype/master_production_schedule/master_production_schedule.py +++ b/erpnext/manufacturing/doctype/master_production_schedule/master_production_schedule.py @@ -289,7 +289,7 @@ class MasterProductionSchedule(Document): return item_wise_data def add_mps_data(self, data): - data = frappe._dict(sorted(data.items(), key=lambda x: x[0][1])) + data = frappe._dict(sorted(data.items(), key=lambda x: x[0][1] or "")) for key in data: row = data[key]