diff --git a/apps/wpm/tasks.py b/apps/wpm/tasks.py index 75e88e37..f5e6b313 100644 --- a/apps/wpm/tasks.py +++ b/apps/wpm/tasks.py @@ -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: