remove circular dependencies on SetFELog

This commit is contained in:
2023-04-09 13:21:44 +10:00
parent a84ff49413
commit 5bd925fa5a
2 changed files with 3 additions and 2 deletions

View File

@@ -5,7 +5,6 @@ from sqlalchemy import Sequence
from sqlalchemy.exc import SQLAlchemyError
from flask_login import login_required, current_user
from main import db, app, ma
from job import SetFELog
# pylint: disable=no-member
@@ -137,6 +136,7 @@ def settings():
def SettingsRBPath():
settings = Settings.query.first()
if settings == None:
from job import SetFELog
SetFELog( message="Cannot create file data with no settings / recycle bin path is missing", log_level="error", persistent=True, cant_close=False)
return
# path setting is an absolute path, just use it, otherwise prepend base_path first
@@ -154,6 +154,7 @@ def SettingsSPath():
paths=[]
settings = Settings.query.first()
if settings == None:
from job import SetFELog
SetFELog( message="Cannot create file data with no settings / storage path is missing", log_level="error", persistent=True, cant_close=False)
return
if settings.storage_path[0] == '/':