From ce38c3e3387c114eaceedf7bb45d47e4318e88cd Mon Sep 17 00:00:00 2001 From: caoqianming Date: Tue, 7 May 2024 10:16:22 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20get=5Ftotal=5Fhour=5Fnow=20exclude=20?= =?UTF-8?q?=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/wpm/tasks.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/wpm/tasks.py b/apps/wpm/tasks.py index 5173115d..307b1a7d 100644 --- a/apps/wpm/tasks.py +++ b/apps/wpm/tasks.py @@ -49,7 +49,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__lt=F('total_hour')).update(total_hour_now=F('total_hour')) + total_hour_now=F('total_hour')).update(total_hour_now=F('total_hour')) sf_qs = SfLog.objects.filter(end_time__gt=now) for i in sf_qs: total_hour_now = (now-i.start_time).total_seconds()/3600