diff --git a/yuthon_will_task/models/yuthon_will_task.py b/yuthon_will_task/models/yuthon_will_task.py index 7f08c319f..052c8538a 100644 --- a/yuthon_will_task/models/yuthon_will_task.py +++ b/yuthon_will_task/models/yuthon_will_task.py @@ -210,8 +210,8 @@ class YuthonWillTask(models.Model): reminder_truncated = task.reminder_time.replace(second=0, microsecond=0) if reminder_truncated == now_truncated: task.task_state = 'done' - for task_time in task.employee_ids: - employee_list.append(task_time.employee_id) + for employee_id in task.employee_ids: + employee_list.append(employee_id) for employee_id in employee_list: if not employee_id.wecom_userid: raise UserError("请同步{}的企业微信".format(employee_id.name))