From bae2b7b8f5f06bc5fff8142cfafa0fc9241432d7 Mon Sep 17 00:00:00 2001 From: caoqianming Date: Wed, 4 Sep 2024 15:50:07 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20mlogb=20=E6=A0=A1=E9=AA=8C?= 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 b36bb633..43aeec8b 100644 --- a/apps/wpm/serializers.py +++ b/apps/wpm/serializers.py @@ -436,6 +436,8 @@ class MlogbInSerializer(CustomModelSerializer): def validate(self, attrs): mlog: Mlog = attrs['mlog'] mtask: Mtask = attrs['mtask'] + if mtask.submit_time is not None: + raise ValidationError('不可选择已提交的任务') wm_in: WMaterial = attrs['wm_in'] if wm_in.state != WMaterial.WM_OK: raise ValidationError('非合格品不可使用')