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:
|
elif all:
|
||||||
stlogs = StLog.objects.all()
|
stlogs = StLog.objects.all()
|
||||||
else: # 不传就默认更新未结束的
|
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:
|
if now is None:
|
||||||
now = timezone.now()
|
now = timezone.now()
|
||||||
for stlog in stlogs:
|
for stlog in stlogs:
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue