Fix error thrown on task execution

This commit is contained in:
Andrew 2022-04-12 18:57:18 -04:00
parent bb2c1de418
commit 316d0aa17a

View File

@ -444,8 +444,10 @@ class TasksManager:
def schedule_watcher(self, event): def schedule_watcher(self, event):
if not event.exception: if not event.exception:
if str(event.job_id).isnumeric(): if str(event.job_id).isnumeric():
task = helpers_management.get_scheduled_task_model(int(event.job_id)) task = self.controller.management.get_scheduled_task_model(
helpers_management.add_to_audit_log_raw( int(event.job_id)
)
self.controller.management.add_to_audit_log_raw(
"system", "system",
helper_users.get_user_id_by_name("system"), helper_users.get_user_id_by_name("system"),
task.server_id, task.server_id,