Fix critical bug and deprecation warnings
- Fixed bug in games_router.py: player_result -> player_stmt in create_game - Updated main.py lifespan from generator to @asynccontextmanager (FastAPI deprecation) - security.py already uses datetime.now(timezone.utc) - no change needed - All 28 tests pass
This commit is contained in:
@@ -346,7 +346,7 @@ async def create_game(
|
||||
|
||||
# Fetch players for response
|
||||
player_stmt = select(GamePlayer).where(GamePlayer.game_id == new_game.id)
|
||||
player_result = await db.execute(player_result)
|
||||
player_result = await db.execute(player_stmt)
|
||||
players = player_result.scalars().all()
|
||||
|
||||
new_game.players = [GamePlayerResponse.model_validate(p) for p in players]
|
||||
|
||||
Reference in New Issue
Block a user