From 636042e9c391f57121c42de1b0bae5486243a67f Mon Sep 17 00:00:00 2001 From: caoqianming Date: Fri, 12 Dec 2025 08:54:01 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20validate=5Fdag=E6=A3=80=E6=9F=A5?= =?UTF-8?q?=E6=A3=80=E6=9F=A5=E6=9C=AA=E5=88=B0=E8=BE=BE=E7=9A=84=E7=89=A9?= =?UTF-8?q?=E6=96=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/mtm/models.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/apps/mtm/models.py b/apps/mtm/models.py index 4d8cc0ed..b3bae42b 100644 --- a/apps/mtm/models.py +++ b/apps/mtm/models.py @@ -527,7 +527,9 @@ class Route(CommonADModel): # 5. 检查未到达的物料 unreachable_ids = all_material_ids - visited - if check_final and unreachable_ids: + if check_final is False: + unreachable_ids.discard(final_id) + if unreachable_ids: # unreachable_materials = Material.objects.filter(id__in=unreachable_ids).values_list('name', flat=True) # raise ParseError( # f"以下物料无法到达最终物料: {list(unreachable_materials)}"