Skip to content

Commit 0b6cdec

Browse files
committed
Update __init__.py
1 parent 8f0be8a commit 0b6cdec

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

web/admin/__init__.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,9 +99,13 @@
9999

100100
app.config['BASIC_AUTH_OPEN'] = False
101101
with app.app_context():
102-
basic_auth = model.getOptionByJson('basic_auth', default={'open':False})
103-
if basic_auth['open']:
104-
app.config['BASIC_AUTH_OPEN'] = True
102+
try:
103+
basic_auth = model.getOptionByJson('basic_auth', default={'open':False})
104+
if basic_auth['open']:
105+
app.config['BASIC_AUTH_OPEN'] = True
106+
except Exception as e:
107+
pass
108+
105109

106110

107111
# 加载模块

0 commit comments

Comments
 (0)