From 77bbde149af92bc681664dd76c628164776ee466 Mon Sep 17 00:00:00 2001 From: Andrew Date: Sun, 17 Apr 2022 13:27:00 -0400 Subject: [PATCH] Fix fresh install side effects from DB rework --- app/classes/shared/main_controller.py | 5 ++--- app/classes/shared/main_models.py | 3 ++- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/classes/shared/main_controller.py b/app/classes/shared/main_controller.py index d59984e3..efcfabf5 100644 --- a/app/classes/shared/main_controller.py +++ b/app/classes/shared/main_controller.py @@ -234,9 +234,8 @@ class Controller: self.users.stop_prepare(exec_user["user_id"]) self.support_scheduler.remove_job("logs_" + str(exec_user["user_id"])) - @staticmethod - def add_system_user(): - HelperUsers.add_user( + def add_system_user(self): + self.users_helper.add_user( "system", Helpers.random_string_generator(64), "default@example.com", diff --git a/app/classes/shared/main_models.py b/app/classes/shared/main_models.py index 1a0ef46a..19699395 100644 --- a/app/classes/shared/main_models.py +++ b/app/classes/shared/main_models.py @@ -2,6 +2,7 @@ import logging from playhouse.shortcuts import model_to_dict from app.classes.shared.helpers import Helpers # pylint: disable=unused-import +from app.classes.shared.console import Console logger = logging.getLogger(__name__) @@ -14,7 +15,7 @@ class DatabaseBuilder: def default_settings(self): logger.info("Fresh Install Detected - Creating Default Settings") - self.helper.console.info("Fresh Install Detected - Creating Default Settings") + Console.info("Fresh Install Detected - Creating Default Settings") default_data = self.helper.find_default_password() username = default_data.get("username", "admin")