fix: 获取batchst时默认使用version=1

This commit is contained in:
caoqianming 2025-04-25 16:27:48 +08:00
parent d6fe5af39c
commit be57fec29f
1 changed files with 1 additions and 1 deletions

View File

@ -621,7 +621,7 @@ class BatchSt(BaseModel):
创建新的批次
"""
if mio is None and handover is None and mlog is None:
return cls.objects.get_or_create(batch=batch)
return cls.objects.get_or_create(batch=batch, version=1)
else:
version = 1
# 带有来源的批次获取,需检查批次号是否可用