feat: 检验撤回test_date在count_notok时直接置空
This commit is contained in:
parent
458385c0f6
commit
0473be4d30
|
@ -268,6 +268,8 @@ class MIOItemViewSet(ListModelMixin, BulkCreateModelMixin, BulkDestroyModelMixin
|
||||||
raise ParseError('该明细还未检验')
|
raise ParseError('该明细还未检验')
|
||||||
if ins.count_notok > 0:
|
if ins.count_notok > 0:
|
||||||
InmService.update_mb_item(ins, 1, 'count_notok', mio.type, mio.belong_dept)
|
InmService.update_mb_item(ins, 1, 'count_notok', mio.type, mio.belong_dept)
|
||||||
|
elif ins.count_notok == 0:
|
||||||
|
pass
|
||||||
ins.test_date = None
|
ins.test_date = None
|
||||||
ins.save()
|
ins.save()
|
||||||
return Response()
|
return Response()
|
||||||
|
|
Loading…
Reference in New Issue