From bccbfe97b3ace6f0f4688b4281abc36985944f3b Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Tue, 30 Sep 2025 21:46:40 +0530 Subject: [PATCH] fix: ignore orders in mps --- .../master_production_schedule/master_production_schedule.py | 3 +++ 1 file changed, 3 insertions(+) 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 906a329acca..5cc9f2c7b6e 100644 --- a/erpnext/manufacturing/doctype/master_production_schedule/master_production_schedule.py +++ b/erpnext/manufacturing/doctype/master_production_schedule/master_production_schedule.py @@ -224,6 +224,9 @@ class MasterProductionSchedule(Document): if ignore_orders: names = [name for name in names if name not in ignore_orders] + if not names: + return [] + query = query.where(doctype.parent.isin(names)) return query.run(as_dict=True)