This commit is contained in:
starnakin 2023-12-26 21:35:08 +01:00
parent 98ec43e7b9
commit 35a2f273f9
2 changed files with 11 additions and 11 deletions

View File

@ -14,7 +14,7 @@ class GameModel(models.Model):
return self.pk
def get_players_id(self):
return [game_member.member_id for game_member in GameMembersModel.objects.filter(self.pk)]
return [game_member.member_id for game_member in GameMembersModel.objects.filter(game_id = self.pk)]
class GameMembersModel(models.Model):
game_id = models.IntegerField()

View File

@ -144,7 +144,7 @@ class TournamentRoomManager(AbstractRoomManager):
if (room.tournament_id == tournament_id):
return room
if (TournamentModel.objects.filter(pk = tournament_id, finished=False).exists()):
if (TournamentModel.objects.filter(pk = tournament_id).exists()):
room = TournamentRoom(self, tournament_id)
self.append(room)
return room