Skip to content

Commit 31420a1

Browse files
committed
Only display clarifications about Problems when the ContestProblem is still linked
1 parent d42d73c commit 31420a1

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
@@ -279,8 +279,10 @@ protected function getQueryBuilder(Request $request): QueryBuilder
279279
->leftJoin('clar.sender', 's')
280280
->leftJoin('clar.recipient', 'r')
281281
->leftJoin('clar.problem', 'p')
282+
->innerJoin('c.problems', 'cp')
282283
->select('clar, c, r, reply, p')
283284
->andWhere('clar.contest = :cid')
285+
->andWhere('clar.problem IS NULL OR clar.problem = cp.problem')
284286
->setParameter('cid', $this->getContestId($request))
285287
->orderBy('clar.clarid');
286288

0 commit comments

Comments
 (0)