mirror of
https://github.com/open-webui/open-webui
synced 2025-06-13 18:02:50 +00:00
refac
This commit is contained in:
parent
f7f3ae7cc9
commit
addf44b21f
@ -84,7 +84,7 @@ async def get_session_user(
|
||||
data = decode_token(token)
|
||||
expires_at = data.get("exp")
|
||||
|
||||
if int(time.time()) > expires_at:
|
||||
if (expires_at is not None) and int(time.time()) > expires_at:
|
||||
raise HTTPException(
|
||||
status_code=status.HTTP_401_UNAUTHORIZED,
|
||||
detail=ERROR_MESSAGES.INVALID_TOKEN,
|
||||
|
Loading…
Reference in New Issue
Block a user