Skip to content

Commit ca49ab6

Browse files
Add nullcheck for problem of testcase in auditlog.
Testcase.probid is nullable, so the problem doesn't have to exist. (cherry picked from commit 990838b)
1 parent f5d8b15 commit ca49ab6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

webapp/src/Controller/Jury/AuditLogController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ private function generateDatatypeUrl(string $type, $id): ?string
168168
return $this->generateUrl('jury_user', ['userId' => $id]);
169169
case 'testcase':
170170
$testcase = $this->em->getRepository(Testcase::class)->find($id);
171-
if ($testcase) {
171+
if ($testcase && $testcase->getProblem()) {
172172
return $this->generateUrl('jury_problem_testcases', ['probId' => $testcase->getProblem()->getProbid()]);
173173
}
174174
break;

0 commit comments

Comments
 (0)