Fix tournaments always reporting as not saved if placeholder team (in /looking)

This commit is contained in:
Kalle 2026-03-20 17:50:38 +02:00
parent a1d2784a9e
commit 19213056a7
2 changed files with 3 additions and 1 deletions

View File

@ -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),

View File

@ -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
`);