aboutsummaryrefslogtreecommitdiffstats
path: root/models
diff options
context:
space:
mode:
Diffstat (limited to 'models')
-rw-r--r--models/git/commit_status.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/models/git/commit_status.go b/models/git/commit_status.go
index 17090f30dd..e7616fb167 100644
--- a/models/git/commit_status.go
+++ b/models/git/commit_status.go
@@ -283,9 +283,9 @@ func GetLatestCommitStatus(ctx context.Context, repoID int64, sha string, listOp
Where("repo_id = ?", repoID).And("sha = ?", sha).
Select("max( id ) as id").
GroupBy("context_hash").OrderBy("max( id ) desc")
-
- sess = db.SetSessionPagination(sess, &listOptions)
-
+ if !listOptions.IsListAll() {
+ sess = db.SetSessionPagination(sess, &listOptions)
+ }
count, err := sess.FindAndCount(&ids)
if err != nil {
return nil, count, err