From 63dbc00a125123814d845eae742b069d4479c328 Mon Sep 17 00:00:00 2001 From: caoqianming Date: Wed, 12 Jun 2024 10:13:59 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20dispatch=5Fcheckwork=5Ftask=E8=87=AA?= =?UTF-8?q?=E5=8A=A8=E6=B7=BB=E5=8A=A0time=5Fend?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/dpm/tasks.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/dpm/tasks.py b/apps/dpm/tasks.py index 2bc39a66..559197d6 100644 --- a/apps/dpm/tasks.py +++ b/apps/dpm/tasks.py @@ -15,8 +15,8 @@ def dispath_checkwork_task(checktaskset: str): cw.name = '风险点检查(自动派发)' now = timezone.now() cw.time_start = now - if cts.expire: - cw.time_end = now + timedelta(hours=cts.expire) + expire_hour = cts.expire if cts.expire else 24 + cw.time_end = now + timedelta(hours=expire_hour) cw.user_duty = cts.user_duty cw.riskpoint = cts.riskpoint cw.note = cts.note