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