Skip to content

Commit 96a15ab

Browse files
nickygerritsenvmcj
authored andcommitted
Add more left joins for internal error judging tables since they all depend on judgings.
Also fix logic when we have no affected judgings. (cherry picked from commit 9a05f11)
1 parent 675db71 commit 96a15ab

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

webapp/src/Controller/Jury/InternalErrorController.php

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -154,9 +154,9 @@ public function handleAction(Request $request, ?Profiler $profiler, int $errorId
154154
$internalError = $this->em->createQueryBuilder()
155155
->from(InternalError::class, 'e')
156156
->leftJoin('e.affectedJudgings', 'j')
157-
->join('j.submission', 's')
158-
->join('j.contest', 'c')
159-
->join('s.team', 't')
157+
->leftJoin('j.submission', 's')
158+
->leftJoin('j.contest', 'c')
159+
->leftJoin('s.team', 't')
160160
->leftJoin('s.rejudging', 'r')
161161
->select('e, j, s, c, t, r')
162162
->where('e.errorid = :id')
@@ -195,7 +195,7 @@ public function handleAction(Request $request, ?Profiler $profiler, int $errorId
195195
sprintf('internal error: %s', InternalErrorStatusType::STATUS_RESOLVED));
196196

197197
$affectedJudgings = $internalError->getAffectedJudgings();
198-
if (!empty($affectedJudgings)) {
198+
if (!$affectedJudgings->isEmpty()) {
199199
$skipped = [];
200200
$rejudging = $this->rejudgingService->createRejudging(
201201
'Internal Error ' . $internalError->getErrorid() . ' resolved',
@@ -220,6 +220,8 @@ public function handleAction(Request $request, ?Profiler $profiler, int $errorId
220220
);
221221
$progressReporter(100, '', $message);
222222
}
223+
} else {
224+
$progressReporter(100, '', 'No affected judgings.');
223225
}
224226
});
225227
});

0 commit comments

Comments
 (0)