feat: mlogbout 校验不合格字段
This commit is contained in:
parent
ab759a76c9
commit
301535813b
|
@ -428,6 +428,8 @@ class MlogbOutUpdateSerializer(CustomModelSerializer):
|
|||
count_notok = 0
|
||||
for i in attrs:
|
||||
if 'count_n_' in i:
|
||||
if not hasattr(Mlogb, i):
|
||||
raise ValidationError(f'{i}不存在')
|
||||
count_notok = count_notok + attrs[i]
|
||||
attrs['count_notok'] = count_notok
|
||||
if attrs['count_real'] >= attrs['count_ok'] + attrs['count_notok']:
|
||||
|
|
Loading…
Reference in New Issue