From ec356dd0e6273feed1499f4d67c6e16bd5779bfd Mon Sep 17 00:00:00 2001 From: Michael Vasseur Date: Sun, 27 Oct 2024 11:44:25 +0100 Subject: [PATCH] Repair downloading of the DebugPackage We couldn't translate the provided parameter to the existing DebugPackage. --- webapp/src/Controller/Jury/SubmissionController.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/webapp/src/Controller/Jury/SubmissionController.php b/webapp/src/Controller/Jury/SubmissionController.php index f6fba7f8d3..6c13465112 100644 --- a/webapp/src/Controller/Jury/SubmissionController.php +++ b/webapp/src/Controller/Jury/SubmissionController.php @@ -36,6 +36,7 @@ use Doctrine\ORM\NonUniqueResultException; use Doctrine\ORM\NoResultException; use Doctrine\ORM\Query\Expr\Join; +use Symfony\Bridge\Doctrine\Attribute\MapEntity; use Symfony\Bridge\Doctrine\Form\Type\EntityType; use Symfony\Component\Form\Extension\Core\Type\SubmitType; use Symfony\Component\Form\Extension\Core\Type\TextareaType; @@ -639,8 +640,9 @@ public function requestFullDebug(Request $request, Judging $jid): RedirectRespon } #[Route(path: '/download-full-debug/{debug_package_id}', name: 'download_full_debug')] - public function downloadFullDebug(DebugPackage $debugPackage): StreamedResponse - { + public function downloadFullDebug( + #[MapEntity(id: 'debug_package_id')] DebugPackage $debugPackage + ): StreamedResponse { $name = 'debug_package.j' . $debugPackage->getJudging()->getJudgingid() . '.db' . $debugPackage->getDebugPackageId() . '.jh' . $debugPackage->getJudgehost()->getJudgehostid()