tournament: add: game call func when finished
This commit is contained in:
@ -53,7 +53,7 @@ class TournamentModel(models.Model):
|
||||
return game
|
||||
|
||||
def get_games(self) -> list[GameModel]:
|
||||
return [tournament_game.game for tournament_game in TournamentGameModel.objects.filter(tournament=self)]
|
||||
return [games for games in self.get_games_by_round(i for i in range(1, self.round))]
|
||||
|
||||
def get_games_by_round(self, round: int) -> list[GameModel]:
|
||||
return [tournament_game.game for tournament_game in TournamentGameModel.objects.filter(tournament=self, round=round)]
|
||||
|
Reference in New Issue
Block a user