Skip to content

Commit

Permalink
fix(sqlite): fix count on repos table
Browse files Browse the repository at this point in the history
  • Loading branch information
jkuri committed Jun 13, 2021
1 parent c16a368 commit 992b2f3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/store/repo/repo.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ func (s repositoryStore) List(filters core.RepositoryFilter) ([]core.Repository,
db = db.Offset(filters.Offset)
}

err = db.Order("active desc, name asc").Group("repositories.id").Find(&repos).Limit(-1).Count(&count).Error
err = db.Order("active desc, name asc").Group("repositories.id").Find(&repos).Limit(-1).Offset(-1).Count(&count).Error
if err != nil || count == 0 {
return repos, count, err
}
Expand Down

0 comments on commit 992b2f3

Please sign in to comment.