Skip to content

Commit 8c62e10

Browse files
author
DOMjudge team
committed
Only set valid to false if source is import
1 parent 8dd2a2e commit 8c62e10

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

webapp/src/Service/SubmissionService.php

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -732,13 +732,11 @@ public function submitSolution(
732732
// This is so that we can use the submitid/judgingid below.
733733
$this->em->flush();
734734

735-
$priority = match ($source) {
736-
SubmissionSource::PROBLEM_IMPORT => JudgeTask::PRIORITY_LOW,
737-
default => JudgeTask::PRIORITY_DEFAULT,
738-
};
739735
// Create judgetask as invalid when evaluating as analyst.
740736
$lazyEval = $this->config->get('lazy_eval_results');
741-
$this->dj->maybeCreateJudgeTasks($judging, $priority, valid: $lazyEval !== DOMJudgeService::EVAL_ANALYST);
737+
$isAnalystImport = $source === SubmissionSource::PROBLEM_IMPORT && $lazyEval === DOMJudgeService::EVAL_ANALYST;
738+
$priority = $isAnalystImport ? JudgeTask::PRIORITY_LOW : JudgeTask::PRIORITY_DEFAULT;
739+
$this->dj->maybeCreateJudgeTasks($judging, $priority, valid: !$isAnalystImport);
742740
}
743741

744742
$this->em->wrapInTransaction(function () use ($contest, $submission) {

0 commit comments

Comments
 (0)