mirror of
https://github.com/simple-login/app.git
synced 2025-02-23 23:34:05 +08:00
handle case user is None
This commit is contained in:
parent
4a7b73a218
commit
dec956c84d
1 changed files with 1 additions and 1 deletions
|
@ -306,7 +306,7 @@ def fake_data():
|
|||
@login_manager.user_loader
|
||||
def load_user(user_id):
|
||||
user = User.get(user_id)
|
||||
if user.disabled:
|
||||
if user and user.disabled:
|
||||
return None
|
||||
|
||||
return user
|
||||
|
|
Loading…
Reference in a new issue