This commit is contained in:
Aevann1 2021-10-29 04:32:23 +02:00
parent bfa5aeda69
commit a01eb7c5da
5 changed files with 17 additions and 23 deletions

View file

@ -9,9 +9,10 @@ def get_logged_in_user():
token = request.headers.get("Authorization")
if not token: return None
client = g.db.query(ClientAuth).options(lazyload('*')).filter(ClientAuth.access_token == token).first()
x = (client.user, client) if client else (None, None)
try:
client = g.db.query(ClientAuth).options(lazyload('*')).filter(ClientAuth.access_token == token).first()
x = (client.user, client) if client else (None, None)
except: x = (None, None)
else: