Fix crash if not loged
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
0d555f8f9c
commit
bb842f7fd0
@ -138,8 +138,7 @@ def context_processor():
|
|||||||
def login_required(fn):
|
def login_required(fn):
|
||||||
@wraps(fn)
|
@wraps(fn)
|
||||||
async def wrapper(*args, **kwargs):
|
async def wrapper(*args, **kwargs):
|
||||||
discord = make_session(token=session.get("oauth2_token"))
|
if session.get("oauth2_token"):
|
||||||
if discord:
|
|
||||||
return await fn(*args, **kwargs)
|
return await fn(*args, **kwargs)
|
||||||
return redirect(url_for(".login"))
|
return redirect(url_for(".login"))
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user