Fix fresh install side effects from DB rework

This commit is contained in:
Andrew 2022-04-17 13:27:00 -04:00
parent fc1304d729
commit 77bbde149a
2 changed files with 4 additions and 4 deletions

View File

@ -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",

View File

@ -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")