From 6851478b874a48b7ae9b28e95da78437554dbbfe Mon Sep 17 00:00:00 2001 From: Ananta Krishnan B Date: Thu, 12 Sep 2024 10:10:04 +0530 Subject: [PATCH] chore: removed metateam references from /api/team/me route --- src/pwncore/routes/team.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/pwncore/routes/team.py b/src/pwncore/routes/team.py index 8de1039..6d9b0ed 100644 --- a/src/pwncore/routes/team.py +++ b/src/pwncore/routes/team.py @@ -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: