Skip to content

Commit 9b62ef2

Browse files
nickygerritsenvmcj
authored andcommitted
Fix setting external judgement types
This used to reset some other config variables. By merging with all existing ones it doesn't do this anymore.
1 parent fac33fd commit 9b62ef2

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

webapp/src/Service/ExternalContestSourceService.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -772,7 +772,11 @@ protected function importJudgementType(Event $event, EventData $data): void
772772
// Verdict not found, import it as a custom verdict; assume it has a penalty.
773773
$customVerdicts = $this->config->get('external_judgement_types');
774774
$customVerdicts[$verdict] = str_replace(' ', '-', $data->name);
775-
$this->config->saveChanges(['external_judgement_types' => $customVerdicts], $this->eventLog, $this->dj);
775+
$this->config->saveChanges(
776+
array_merge($this->config->all(), ['external_judgement_types' => $customVerdicts]),
777+
$this->eventLog,
778+
$this->dj
779+
);
776780
$this->verdicts = $this->config->getVerdicts(['final', 'external']);
777781
$penalty = true;
778782
$solved = false;

0 commit comments

Comments
 (0)