feat: cal_exp_duration_sec 还需要更新时间为None的
This commit is contained in:
parent
f97c99bf8a
commit
5461fb5f55
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue