Skip to content

Commit 0abb563

Browse files
authored
1 parent 5b2bbf1 commit 0abb563

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

models/git/commit_status.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,9 @@ func GetLatestCommitStatusForPairs(ctx context.Context, repoIDsToLatestCommitSHA
323323
Select("max( id ) as id, repo_id").
324324
GroupBy("context_hash, repo_id").OrderBy("max( id ) desc")
325325

326-
sess = db.SetSessionPagination(sess, &listOptions)
326+
if !listOptions.IsListAll() {
327+
sess = db.SetSessionPagination(sess, &listOptions)
328+
}
327329

328330
err := sess.Find(&results)
329331
if err != nil {

routers/web/repo/repo.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -606,7 +606,7 @@ func SearchRepo(ctx *context.Context) {
606606
}
607607

608608
// call the database O(1) times to get the commit statuses for all repos
609-
repoToItsLatestCommitStatuses, err := git_model.GetLatestCommitStatusForPairs(ctx, repoIDsToLatestCommitSHAs, db.ListOptions{})
609+
repoToItsLatestCommitStatuses, err := git_model.GetLatestCommitStatusForPairs(ctx, repoIDsToLatestCommitSHAs, db.ListOptionsAll)
610610
if err != nil {
611611
log.Error("GetLatestCommitStatusForPairs: %v", err)
612612
return

0 commit comments

Comments
 (0)