From 316d0aa17a57f9b21c28d9fcde6e55f74509762d Mon Sep 17 00:00:00 2001 From: Andrew Date: Tue, 12 Apr 2022 18:57:18 -0400 Subject: [PATCH] Fix error thrown on task execution --- app/classes/shared/tasks.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/classes/shared/tasks.py b/app/classes/shared/tasks.py index cb004691..60272f14 100644 --- a/app/classes/shared/tasks.py +++ b/app/classes/shared/tasks.py @@ -444,8 +444,10 @@ class TasksManager: def schedule_watcher(self, event): if not event.exception: if str(event.job_id).isnumeric(): - task = helpers_management.get_scheduled_task_model(int(event.job_id)) - helpers_management.add_to_audit_log_raw( + task = self.controller.management.get_scheduled_task_model( + int(event.job_id) + ) + self.controller.management.add_to_audit_log_raw( "system", helper_users.get_user_id_by_name("system"), task.server_id,