diff options
author | Giteabot <teabot@gitea.io> | 2023-10-19 18:56:39 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-19 10:56:39 +0000 |
commit | 89d3766d22b6dfcbd5e9499d3f85cf889dafb91c (patch) | |
tree | 9c9aef13ba532cadd4f9e48d47269e37efe2ce74 /models/git/commit_status.go | |
parent | 9b14f1a8edf8c94aeee5e16c282b037d4e78daa9 (diff) | |
download | gitea-89d3766d22b6dfcbd5e9499d3f85cf889dafb91c.tar.gz gitea-89d3766d22b6dfcbd5e9499d3f85cf889dafb91c.zip |
Upgrade xorm (#27673) (#27691)
Backport #27673 by @lng2020
Related to https://gitea.com/xorm/xorm/pulls/2341
Co-authored-by: Nanguan Lin <70063547+lng2020@users.noreply.github.com>
Diffstat (limited to 'models/git/commit_status.go')
-rw-r--r-- | models/git/commit_status.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/models/git/commit_status.go b/models/git/commit_status.go index acb0110200..c6a52bcd9f 100644 --- a/models/git/commit_status.go +++ b/models/git/commit_status.go @@ -235,7 +235,7 @@ func GetCommitStatuses(ctx context.Context, repo *repo_model.Repository, sha str countSession := listCommitStatusesStatement(ctx, repo, sha, opts) countSession = db.SetSessionPagination(countSession, opts) - maxResults, err := countSession.Count(new(CommitStatus)) + maxResults, err := countSession.OrderBy("1").Count(new(CommitStatus)) if err != nil { log.Error("Count PRs: %v", err) return nil, maxResults, err |