mirror of
https://gitlab.com/crafty-controller/crafty-4.git
synced 2024-08-30 18:23:09 +00:00
Fix fresh install side effects from DB rework
This commit is contained in:
parent
fc1304d729
commit
77bbde149a
@ -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",
|
||||
|
@ -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")
|
||||
|
Loading…
Reference in New Issue
Block a user