Skip to content

Commit

Permalink
Fix sql error on suggesters page
Browse files Browse the repository at this point in the history
  • Loading branch information
vtsykun committed Sep 14, 2024
1 parent 1243798 commit 3769042
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
3 changes: 1 addition & 2 deletions src/Repository/PackageRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -451,12 +451,11 @@ public function getSuggestCount($name)

public function getSuggests($name, $offset = 0, $limit = 15)
{
$sql = 'SELECT p.id, p.name, p.description, p.language, p.abandoned, p.replacementPackage
$sql = 'SELECT DISTINCT p.id, p.name, p.description, p.language, p.abandoned, p.replacementPackage
FROM link_suggest s
INNER JOIN package_version pv ON (pv.id = s.version_id AND pv.development = true)
INNER JOIN package p ON (p.id = pv.package_id)
WHERE s.packageName = :name
GROUP BY pv.package_id
ORDER BY p.name ASC LIMIT ' . ((int)$limit) . ' OFFSET ' . ((int)$offset);

$stmt = $this->getEntityManager()->getConnection()
Expand Down
1 change: 1 addition & 0 deletions tests/Functional/Controller/BaseAclControllerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ public static function adminUrlProvider(): array
['/'],
['/packages/okvpn/cron-bundle'],
['/packages/okvpn/cron-bundle/stats'],
['/packages/okvpn/cron-bundle/suggesters'],
['/packages/submit'],
['/users/'],
['/users/dev'],
Expand Down

0 comments on commit 3769042

Please sign in to comment.