fix: address code review findings
- Guard against empty awardTypeIds array in AwardRepository - Refactor Stimulus controller to use data-action attributes instead of imperative addEventListener (fixes duplicate listener issue) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -36,6 +36,10 @@ class AwardRepository extends ServiceEntityRepository
|
||||
->andWhere('a.actor = :actorId')
|
||||
->setParameter('actorId', $actorId);
|
||||
|
||||
if ($awardTypeIds !== null && empty($awardTypeIds)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
if ($awardTypeIds !== null) {
|
||||
$qb->andWhere('a.awardType IN (:typeIds)')
|
||||
->setParameter('typeIds', $awardTypeIds);
|
||||
|
||||
Reference in New Issue
Block a user