feat: mlogb 校验
This commit is contained in:
parent
6e7e6c584e
commit
bae2b7b8f5
|
|
@ -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('非合格品不可使用')
|
||||
|
|
|
|||
Loading…
Reference in New Issue