Skip to content

Commit 054229d

Browse files
committed
fix
1 parent dd30d9d commit 054229d

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

models/git/commit_status.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ func GetLatestCommitStatus(ctx context.Context, repoID int64, sha string, listOp
304304
}
305305

306306
// GetLatestCommitStatusForPairs returns all statuses with a unique context for a given list of repo-sha pairs
307-
func GetLatestCommitStatusForPairs(ctx context.Context, repoIDsToLatestCommitSHAs map[int64]string, listOptions db.ListOptions) (map[int64][]*CommitStatus, error) {
307+
func GetLatestCommitStatusForPairs(ctx context.Context, repoIDsToLatestCommitSHAs map[int64]string) (map[int64][]*CommitStatus, error) {
308308
type result struct {
309309
ID int64
310310
RepoID int64
@@ -323,8 +323,6 @@ 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)
327-
328326
err := sess.Find(&results)
329327
if err != nil {
330328
return nil, err

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)
610610
if err != nil {
611611
log.Error("GetLatestCommitStatusForPairs: %v", err)
612612
return

0 commit comments

Comments
 (0)