fix: dispatch_checkwork_task自动添加time_end

This commit is contained in:
caoqianming 2024-06-12 10:13:59 +08:00
parent 7f3da29560
commit 63dbc00a12
1 changed files with 2 additions and 2 deletions

View File

@ -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