Fix tournament SP not being calculated Closes #1611

This commit is contained in:
Kalle
2023-12-17 12:05:21 +02:00
parent 845ae1b0a1
commit 31e494db71

View File

@@ -186,7 +186,7 @@ export const action: ActionFunction = async ({ params, request }) => {
const season = currentSeason(
databaseTimestampToDate(tournament.startTime),
);
)?.nth;
addSummary({
tournamentId,
@@ -196,16 +196,16 @@ export const action: ActionFunction = async ({ params, request }) => {
results,
calculateSeasonalStats: typeof season === "number",
queryCurrentTeamRating: (identifier) =>
queryCurrentTeamRating({ identifier, season: season!.nth }).rating,
queryCurrentTeamRating({ identifier, season: season! }).rating,
queryCurrentUserRating: (userId) =>
queryCurrentUserRating({ userId, season: season!.nth }).rating,
queryCurrentUserRating({ userId, season: season! }).rating,
queryTeamPlayerRatingAverage: (identifier) =>
queryTeamPlayerRatingAverage({
identifier,
season: season!.nth,
season: season!,
}),
}),
season: season?.nth,
season,
});
return null;