summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLin Jen-Shin <godfat@godfat.org>2016-07-18 21:17:16 +0800
committerLin Jen-Shin <godfat@godfat.org>2016-07-18 21:17:16 +0800
commite51d4a05b7195a98b48548c4c7260886f956b6d2 (patch)
tree3fdd0dd9e0076fae5e0fbeb0305c4bff768cc1dd
parentaf86b8c2c2b6fb08ea55eb89f1dd20aba81862ae (diff)
downloadgitlab-ce-e51d4a05b7195a98b48548c4c7260886f956b6d2.tar.gz
We should actually give latest success builds as well
-rw-r--r--app/models/project.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/project.rb b/app/models/project.rb
index 1578fe67581..d26aa8073e8 100644
--- a/app/models/project.rb
+++ b/app/models/project.rb
@@ -432,7 +432,7 @@ class Project < ActiveRecord::Base
def latest_success_builds_for(ref = 'HEAD')
Ci::Build.joins(:pipeline).
merge(pipelines.where(ref: ref).success.latest).
- with_artifacts
+ with_artifacts.success.latest
end
def merge_base_commit(first_commit_id, second_commit_id)