Skip to content

Commit da7b0e8

Browse files
committed
Handle situation without contest
1 parent 77928f7 commit da7b0e8

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

webapp/src/Service/DOMJudgeService.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -896,6 +896,9 @@ public function checkIfSamplesZipForContest(Contest $contest): bool
896896

897897
/** @var Contest $contest */
898898
$contest = $contestQuery->getQuery()->getSingleResult();
899+
if (!$contest) {
900+
return false;
901+
}
899902

900903
if ($contest->getContestProblemsetType()) {
901904
return true;

0 commit comments

Comments
 (0)