feat: cal_exp_duration_sec 还需要更新时间为None的

This commit is contained in:
zty 2024-08-06 18:40:34 +08:00
parent f97c99bf8a
commit 5461fb5f55
1 changed files with 1 additions and 1 deletions

View File

@ -66,7 +66,7 @@ def cal_exp_duration_sec(stlogId: str='', all=False, now: datetime=None):
elif all:
stlogs = StLog.objects.all()
else: # 不传就默认更新未结束的
stlogs = StLog.objects.filter(end_time=None)
stlogs = StLog.objects.filter(end_time=None)|StLog.objects.filter(duration_sec=None)
if now is None:
now = timezone.now()
for stlog in stlogs: