1
0

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

View File

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