From bb842f7fd00135e2bb7481e0634bd59d0f1081e5 Mon Sep 17 00:00:00 2001 From: Michel Roux Date: Sun, 18 Sep 2022 20:51:49 +0000 Subject: [PATCH] Fix crash if not loged --- divent/bot.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/divent/bot.py b/divent/bot.py index 2376103..c6f9de6 100644 --- a/divent/bot.py +++ b/divent/bot.py @@ -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"))