Skip to content

Commit 193bb34

Browse files
committed
Only display clarifications about Problems when the ContestProblem is still linked
1 parent a6b1008 commit 193bb34

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

webapp/src/Controller/API/ClarificationController.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -277,8 +277,10 @@ protected function getQueryBuilder(Request $request): QueryBuilder
277277
->leftJoin('clar.sender', 's')
278278
->leftJoin('clar.recipient', 'r')
279279
->leftJoin('clar.problem', 'p')
280+
->innerJoin('c.problems', 'cp')
280281
->select('clar, c, r, reply, p')
281282
->andWhere('clar.contest = :cid')
283+
->andWhere('clar.problem IS NULL OR clar.problem = cp.problem')
282284
->setParameter('cid', $this->getContestId($request))
283285
->orderBy('clar.clarid');
284286

0 commit comments

Comments
 (0)