added BUG-120, somehow losing pref info. No prints are working in PROD, so changed a lot of printf( in the F/E to SetFELog with error and persistent/cant_close set across many files. Also used opportunity to remove a few unnecessary debugs

This commit is contained in:
2023-04-09 13:10:28 +10:00
parent cdef403187
commit a84ff49413
6 changed files with 40 additions and 23 deletions

View File

@@ -5,6 +5,7 @@ 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
@@ -136,7 +137,7 @@ def settings():
def SettingsRBPath():
settings = Settings.query.first()
if settings == None:
print("Cannot create file data with no settings / recycle bin path is missing")
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
if settings.recycle_bin_path[0] == '/':
@@ -153,7 +154,7 @@ def SettingsSPath():
paths=[]
settings = Settings.query.first()
if settings == None:
print("Cannot create file data with no settings / storage path is missing")
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] == '/':
path=settings.storage_path