Skip to content

Commit

Permalink
skip non-seasonal tournaments
Browse files Browse the repository at this point in the history
  • Loading branch information
enkoder committed Jan 20, 2024
1 parent dd77b75 commit 295bc98
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions api/src/background.ts
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,10 @@ async function handleTournamentIngest(
const seasons = await Seasons.getFromTimestamp(abrTournament.date.toString());
const seasonId = seasons.length !== 0 ? seasons[0].id : null;

if (seasonId === null) {
return;
}

const entries = await getEntries(abrTournament.id);
const cutTo = entries.filter((e) => e.rank_top !== null).length;
const tournamentBlob = abrToTournament(abrTournament, seasonId, cutTo);
Expand Down

0 comments on commit 295bc98

Please sign in to comment.