Skip to content

Commit

Permalink
chore: removed metateam references from /api/team/me route
Browse files Browse the repository at this point in the history
  • Loading branch information
OneRandom1509 committed Sep 12, 2024
1 parent a37e9a1 commit 6851478
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/pwncore/routes/team.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,9 @@ async def team_members(jwt: RequireJwt):
async def get_self_team(jwt: RequireJwt):
team_id = jwt["team_id"]

team_model = await Team.get(id=team_id).prefetch_related("meta_team")
team_model = await Team.get(id=team_id)

team = dict(await Team_Pydantic.from_tortoise_orm(team_model))
team["meta_team__name"] = getattr(team_model.meta_team, "name", None)
# Get points from leaderboard
# would be better is cache stores the values in a dict indexed by team id
# for leaderboard_team in gcache.data:
Expand Down

0 comments on commit 6851478

Please sign in to comment.