diff --git a/webapp/src/Controller/Jury/InternalErrorController.php b/webapp/src/Controller/Jury/InternalErrorController.php index adb4bd971f..1c7fc250ca 100644 --- a/webapp/src/Controller/Jury/InternalErrorController.php +++ b/webapp/src/Controller/Jury/InternalErrorController.php @@ -103,8 +103,12 @@ public function viewAction(int $errorId): Response case 'judgehost': // Judgehosts get disabled by their hostname, so we need to look it up here. $judgehost = $this->em->getRepository(Judgehost::class)->findOneBy(['hostname' => $disabled['hostname']]); - $affectedLink = $this->generateUrl('jury_judgehost', ['judgehostid' => $judgehost->getJudgehostid()]); $affectedText = $disabled['hostname']; + if ($judgehost) { + $affectedLink = $this->generateUrl('jury_judgehost', ['judgehostid' => $judgehost->getJudgehostid()]); + } else { + $affectedText .= ' (deleted)'; + } break; case 'language': $affectedLink = $this->generateUrl('jury_language', ['langId' => $disabled['langid']]); diff --git a/webapp/templates/jury/internal_error.html.twig b/webapp/templates/jury/internal_error.html.twig index 3ba03ea3d8..fb809430ac 100644 --- a/webapp/templates/jury/internal_error.html.twig +++ b/webapp/templates/jury/internal_error.html.twig @@ -72,7 +72,13 @@ {% if affectedText is not null %} Affected {{ internalError.disabled.kind }} - {{ affectedText }} + + {% if affectedLink %} + {{ affectedText }} + {% else %} + {{ affectedText }} + {% endif %} + {% endif %}