Skip to content

Commit

Permalink
Deref team captain username
Browse files Browse the repository at this point in the history
  • Loading branch information
KwikKill committed Mar 2, 2024
1 parent 7d7fd30 commit 1fef00c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions insalan/tournament/views/tournament.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ def get(self, request, primary_key: int):
"payment_status": Substitute.objects.get(id=pid).payment_status if can_see_payment_status else None
} for pid in team_preser["substitutes"]
]
team_preser["captain"] = Player.objects.get(id=team_preser["captain"]).as_user().username if team_preser["captain"] is not None else None
teams_serialized.append(team_preser)
# deref groups
group_serialized = []
Expand Down

0 comments on commit 1fef00c

Please sign in to comment.