Skip to content

Commit c1c71c3

Browse files
zapotocnylubosvmcj
authored andcommitted
Fix incorrect link generation for testcase audit logs
1 parent af92629 commit c1c71c3

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

webapp/src/Controller/Jury/AuditLogController.php

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -155,11 +155,8 @@ private function generateDatatypeUrl(string $type, int|string|null $id): ?string
155155
}
156156
return $this->generateUrl('jury_user', ['userId' => $id]);
157157
case 'testcase':
158-
$testcase = $this->em->getRepository(Testcase::class)->find($id);
159-
if ($testcase && $testcase->getProblem()) {
160-
return $this->generateUrl('jury_problem_testcases', ['probId' => $testcase->getProblem()->getProbid()]);
161-
}
162-
break;
158+
// For testcase audit logs, the ID is actually the problem ID
159+
return $this->generateUrl('jury_problem_testcases', ['probId' => $id]);
163160
}
164161
return null;
165162
}

0 commit comments

Comments
 (0)