Skip to content

Commit

Permalink
Ignore 'start-status' as shadow
Browse files Browse the repository at this point in the history
Those are imported for the humans, but have nothing todo with shadowing
a contest.

Note that these are only sent by the CDS and not part of the spec.

(cherry picked from commit 8e78b10)
  • Loading branch information
vmcj authored and eldering committed Sep 22, 2024
1 parent 3a896f6 commit 3e14676
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions webapp/src/DataTransferObject/Shadowing/EventType.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ enum EventType: string
case PROBLEMS = 'problems';
case RUNS = 'runs';
case STATE = 'state';
case START_STATUS = 'start-status';
case SUBMISSIONS = 'submissions';
case TEAMS = 'teams';
case TEAM_MEMBERS = 'team-members';
Expand Down
2 changes: 1 addition & 1 deletion webapp/src/Service/ExternalContestSourceService.php
Original file line number Diff line number Diff line change
Expand Up @@ -623,7 +623,7 @@ public function importEvent(Event $event, array $eventsToSkip): void

// Note the @vars here are to make PHPStan understand the correct types.
$method = match ($event->type) {
EventType::ACCOUNTS, EventType::AWARDS, EventType::MAP_INFO, EventType::PERSONS, EventType::TEAM_MEMBERS => $this->ignoreEvent(...),
EventType::ACCOUNTS, EventType::AWARDS, EventType::MAP_INFO, EventType::PERSONS, EventType::START_STATUS, EventType::TEAM_MEMBERS => $this->ignoreEvent(...),
EventType::STATE => $this->validateState(...),
EventType::CONTESTS => $this->validateAndUpdateContest(...),
EventType::JUDGEMENT_TYPES => $this->importJudgementType(...),
Expand Down

0 comments on commit 3e14676

Please sign in to comment.