diff --git a/app/features/tournament/loaders/to.$id.register.server.ts b/app/features/tournament/loaders/to.$id.register.server.ts index 59c998359..378ce2472 100644 --- a/app/features/tournament/loaders/to.$id.register.server.ts +++ b/app/features/tournament/loaders/to.$id.register.server.ts @@ -21,7 +21,7 @@ export const loader = async ({ params }: LoaderFunctionArgs) => { tournamentId, userId: user.id, }); - if (!ownTournamentTeam) + if (!ownTournamentTeam) { return { mapPool: null, friendPlayers: null, @@ -31,6 +31,7 @@ export const loader = async ({ params }: LoaderFunctionArgs) => { tournamentId, }), }; + } return { mapPool: findMapPoolByTeamId(ownTournamentTeam.id), diff --git a/app/features/tournament/queries/findOwnTournamentTeam.server.ts b/app/features/tournament/queries/findOwnTournamentTeam.server.ts index 5dd5c801c..0acb04962 100644 --- a/app/features/tournament/queries/findOwnTournamentTeam.server.ts +++ b/app/features/tournament/queries/findOwnTournamentTeam.server.ts @@ -16,6 +16,7 @@ const stm = sql.prepare(/*sql*/ ` and "TournamentTeamMember"."isOwner" = 1 where "TournamentTeam"."tournamentId" = @tournamentId + and "TournamentTeam"."isPlaceholder" = 0 and "TournamentTeamMember"."userId" = @userId `);