feat: handover revert撤回时做校验2

This commit is contained in:
caoqianming 2025-09-28 16:34:30 +08:00
parent 7b8ec7f9d6
commit bf8b886a2d
1 changed files with 1 additions and 1 deletions

View File

@ -571,7 +571,7 @@ class HandoverViewSet(CustomModelViewSet):
"""
ins: Handover = self.get_object()
if ins.new_batch: # 如果是合批
if Handoverb.objects.filter(wm=ins.new_batch, handover__submit_time__isnull=True).exists():
if Handoverb.objects.filter(batch=ins.new_batch, handover__submit_time__isnull=True).exists():
raise ParseError("该合批存在未提交的交接记录,不可撤回")
if ins.submit_time:
handover_revert(ins, handler=request.user)