From 164f3f16bb1d89780758ad992110526c3c8963f6 Mon Sep 17 00:00:00 2001 From: caoqianming Date: Thu, 13 Nov 2025 10:31:16 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=8B=A6=E6=88=AAnew=5Fbatch=E7=9A=84?= =?UTF-8?q?=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/wpm/serializers.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/apps/wpm/serializers.py b/apps/wpm/serializers.py index 4e2dd35e..91da7ebd 100644 --- a/apps/wpm/serializers.py +++ b/apps/wpm/serializers.py @@ -1208,6 +1208,8 @@ class HandoverSerializer(CustomModelSerializer): new_defect = new_wm.defect if not attrs.get("new_batch", None): raise ParseError("必须指定合并后的批次") + if 'undefined' in attrs['new_batch'] or 'null' in attrs['new_batch']: + raise ParseError("新批次号错误!") wm:WMaterial = attrs.get('wm', None)