mirror of
https://github.com/Sendouc/sendou.ink.git
synced 2026-05-24 04:22:10 -05:00
Fix selected organization not always shown when editing tournament
This commit is contained in:
parent
ce4bdcb170
commit
8ae9e698ed
|
|
@ -84,8 +84,12 @@ export const loader = async ({ request }: LoaderFunctionArgs) => {
|
|||
user.isTournamentOrganizer && !eventToEdit
|
||||
? await CalendarRepository.findRecentTournamentsByAuthorId(user.id)
|
||||
: undefined,
|
||||
organizations: await TournamentOrganizationRepository.findByOrganizerUserId(
|
||||
user.id,
|
||||
organizations: (
|
||||
await TournamentOrganizationRepository.findByOrganizerUserId(user.id)
|
||||
).concat(
|
||||
eventToEdit?.tournament?.ctx.organization
|
||||
? eventToEdit.tournament.ctx.organization
|
||||
: [],
|
||||
),
|
||||
};
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user