tournament: use tournamentGameModel instead gameModel
This commit is contained in:
@ -45,10 +45,12 @@ class TournamentGameSerializer(serializers.ModelSerializer):
|
||||
start_timestamp = serializers.ReadOnlyField()
|
||||
stop_timestamp = serializers.ReadOnlyField()
|
||||
gamemode = serializers.ReadOnlyField()
|
||||
round = serializers.ReadOnlyField()
|
||||
pos = serializers.ReadOnlyField()
|
||||
|
||||
class Meta:
|
||||
model = TournamentGameModel
|
||||
fields = ["id", "winner_id", "state", "started", "finished", "players", "start_timestamp", "stop_timestamp", "game_type"]
|
||||
fields = ["id", "winner_id", "state", "started", "finished", "players", "start_timestamp", "stop_timestamp", "game_type", "round", "pos"]
|
||||
|
||||
def get_state(self, instance: TournamentGameModel):
|
||||
if (instance.finished):
|
||||
|
Reference in New Issue
Block a user