diff --git a/apps/wpm/tasks.py b/apps/wpm/tasks.py index 2d1d0fce..777806f5 100644 --- a/apps/wpm/tasks.py +++ b/apps/wpm/tasks.py @@ -42,7 +42,7 @@ def get_total_hour_now(sflogId: str): return sflog.total_hour_now else: SfLog.objects.filter(end_time__lte=now).exclude(total_hour_now=12).update(total_hour_now=12) - sf_qs = SfLog.objects.filter(end_time_gt=now) + sf_qs = SfLog.objects.filter(end_time__gt=now) for i in sf_qs: i.total_hour_now = (now-localtime(i.start_time)).total_seconds/3600 i.save()