wip league admin tools
This commit is contained in:
@@ -95,7 +95,7 @@ export class SeedRacingData {
|
||||
}
|
||||
}
|
||||
|
||||
const activeSeasons = seed.seasons.filter((season) => season.status === 'active');
|
||||
const activeSeasons = seed.seasons.filter((season) => season.status.isActive());
|
||||
for (const season of activeSeasons) {
|
||||
const presetId = this.selectScoringPresetIdForSeason(season);
|
||||
const preset = getLeagueScoringPresetById(presetId);
|
||||
@@ -270,7 +270,7 @@ export class SeedRacingData {
|
||||
|
||||
for (const league of leagues) {
|
||||
const seasons = await this.seedDeps.seasonRepository.findByLeagueId(league.id.toString());
|
||||
const activeSeasons = seasons.filter((season) => season.status === 'active');
|
||||
const activeSeasons = seasons.filter((season) => season.status.isActive());
|
||||
|
||||
for (const season of activeSeasons) {
|
||||
const existing = await this.seedDeps.leagueScoringConfigRepository.findBySeasonId(season.id);
|
||||
@@ -298,7 +298,7 @@ export class SeedRacingData {
|
||||
}
|
||||
|
||||
private selectScoringPresetIdForSeason(season: Season): string {
|
||||
if (season.leagueId === 'league-5' && season.status === 'active') {
|
||||
if (season.leagueId === 'league-5' && season.status.isActive()) {
|
||||
return 'sprint-main-driver';
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user