添加功能

This commit is contained in:
zhouzhou
2024-11-25 18:20:19 +08:00
parent fa45843606
commit 8781f1cc36
+1 -1
View File
@@ -27,7 +27,7 @@ class YuthonWillTask(models.Model):
for task_time in task.task_time_ids:
time_difference = task.end_time - datetime.now()
duration = self._compute_duration(task_time)
if time_difference <= duration:
if time_difference <= duration and time_difference >= timedelta(seconds=0):
task.add_comment() # 将task_time对象传递给add_comment方法
break # 触发一个提醒后就跳出内循环