Skip to content

Commit

Permalink
game: Fix get_game_result() to provide sheet.game
Browse files Browse the repository at this point in the history
  • Loading branch information
mhthies committed Jul 12, 2020
1 parent 3bda7d4 commit 24e98b4
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions qaqa_bot/game.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,8 +201,11 @@ def get_game_result(self, session: Session, game_id: int) -> model.Game:
selectinload(model.Game.participants)
.joinedload(model.Participant.user),
selectinload(model.Game.sheets)
.selectinload(model.Sheet.entries)
.joinedload(model.Entry.user))\
.options(
selectinload(model.Sheet.game),
selectinload(model.Sheet.entries)
.joinedload(model.Entry.user)
))\
.one_or_none()

session.expunge_all()
Expand Down

0 comments on commit 24e98b4

Please sign in to comment.