diff --git a/app/features/tournament/TournamentRepository.server.ts b/app/features/tournament/TournamentRepository.server.ts index c2d316e6f..a8a4273be 100644 --- a/app/features/tournament/TournamentRepository.server.ts +++ b/app/features/tournament/TournamentRepository.server.ts @@ -125,16 +125,17 @@ export async function findById(id: number) { ).as("mapPool"), jsonObjectFrom( innerEb - .selectFrom("Team") + .selectFrom("AllTeam") .leftJoin( "UserSubmittedImage", - "Team.avatarImgId", + "AllTeam.avatarImgId", "UserSubmittedImage.id", ) - .whereRef("Team.id", "=", "TournamentTeam.teamId") + .whereRef("AllTeam.id", "=", "TournamentTeam.teamId") .select([ - "Team.customUrl", + "AllTeam.customUrl", "UserSubmittedImage.url as logoUrl", + "AllTeam.deletedAt", ]), ).as("team"), ]) diff --git a/app/features/tournament/routes/to.$id.teams.$tid.tsx b/app/features/tournament/routes/to.$id.teams.$tid.tsx index 9f2c57f82..826cd87a0 100644 --- a/app/features/tournament/routes/to.$id.teams.$tid.tsx +++ b/app/features/tournament/routes/to.$id.teams.$tid.tsx @@ -68,7 +68,7 @@ export default function TournamentTeamPage() { : undefined } /> - {team.team ? ( + {team.team && !team.team.deletedAt ? (