Update __init__.py

This commit is contained in:
Mr Chen 2024-11-03 19:50:58 +08:00
parent 8f0be8a475
commit 0b6cdec4ce
1 changed files with 7 additions and 3 deletions

View File

@ -99,9 +99,13 @@ setup.init_db_system()
app.config['BASIC_AUTH_OPEN'] = False
with app.app_context():
basic_auth = model.getOptionByJson('basic_auth', default={'open':False})
if basic_auth['open']:
app.config['BASIC_AUTH_OPEN'] = True
try:
basic_auth = model.getOptionByJson('basic_auth', default={'open':False})
if basic_auth['open']:
app.config['BASIC_AUTH_OPEN'] = True
except Exception as e:
pass
# 加载模块