Skip to content

Commit

Permalink
fix: check for none before passing to UUID
Browse files Browse the repository at this point in the history
  • Loading branch information
anand2312 committed Nov 24, 2023
1 parent cd54b0a commit e19318a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion quill_server/auth/store.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,10 @@ def __init__(self, redis: Redis, session_lifespan: timedelta = timedelta(days=1)

async def get_session(self, _id: str) -> Session | None:
data = await self.redis.get(f"session:{_id}")
user_id = UUID(bytes=data)
if data is None:
logger.info(f"Session not found for token={_id}")
return None
user_id = UUID(bytes=data)
return Session(id=_id, user_id=user_id)

async def create_session(self, user_id: UUID) -> Session:
Expand Down
1 change: 1 addition & 0 deletions quill_server/realtime/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Quill WebSocket Server Documentation

0 comments on commit e19318a

Please sign in to comment.