diff --git a/webapp/src/Controller/API/JudgehostController.php b/webapp/src/Controller/API/JudgehostController.php index cd578247f3..e9b184606f 100644 --- a/webapp/src/Controller/API/JudgehostController.php +++ b/webapp/src/Controller/API/JudgehostController.php @@ -175,7 +175,7 @@ public function createJudgehostAction(Request $request): array ->andWhere('jh.hostname = :hostname') ->andWhere('j.judgingid = jt.jobid') ->andWhere('jr.runresult IS NULL') - ->andWhere('j.valid = 1 OR r.valid = 1') + ->andWhere('j.valid = 1 OR j.rejudging IS NOT NULL') ->andWhere('j.result != :compiler_error') ->setParameter('hostname', $hostname) ->setParameter('compiler_error', 'compiler-error')