Fix crash if not loged
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Michel Roux 2022-09-18 20:51:49 +00:00
parent 0d555f8f9c
commit bb842f7fd0

View File

@ -138,8 +138,7 @@ def context_processor():
def login_required(fn):
@wraps(fn)
async def wrapper(*args, **kwargs):
discord = make_session(token=session.get("oauth2_token"))
if discord:
if session.get("oauth2_token"):
return await fn(*args, **kwargs)
return redirect(url_for(".login"))