fix(projects): return correct project pagination count

This commit is contained in:
kolaente 2024-03-02 13:30:34 +01:00
parent e42a605597
commit a3932a0a19
Signed by: konrad
GPG Key ID: F40E70337AB24C9B
1 changed files with 1 additions and 1 deletions

View File

@ -455,7 +455,7 @@ SELECT DISTINCT * FROM all_projects ORDER BY position `+limitSQL, args...).Find(
totalCount, err = s.
SQL(`WITH RECURSIVE all_projects as (`+baseQuery+`)
SELECT count(*) FROM all_projects GROUP BY all_projects.id`, args...).
SELECT COUNT(DISTINCT all_projects.id) FROM all_projects`, args...).
Count(&Project{})
if err != nil {
return nil, 0, err