summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authormicael.bergeron <micaelbergeron@gmail.com>2017-12-06 08:32:12 -0500
committermicael.bergeron <micaelbergeron@gmail.com>2017-12-07 09:02:42 -0500
commit16c8b91092fa0fe0b5822648c22ee545e11cb4bc (patch)
tree907bc51015aa4b965a832d7f90bea54d5558f379 /app
parentcb6f51ec9b2006f1040cca94119135c92e9a4cd1 (diff)
downloadgitlab-ce-16c8b91092fa0fe0b5822648c22ee545e11cb4bc.tar.gz
revert the `#all_pipelines` method to use the pluck
the `ci_pipelines.sha` column is not the same type than the `merge_request_diff_commits.sha` column (varchar, bytea)
Diffstat (limited to 'app')
-rw-r--r--app/models/merge_request.rb3
1 files changed, 1 insertions, 2 deletions
diff --git a/app/models/merge_request.rb b/app/models/merge_request.rb
index 22a79da9879..2dad036639a 100644
--- a/app/models/merge_request.rb
+++ b/app/models/merge_request.rb
@@ -921,9 +921,8 @@ class MergeRequest < ActiveRecord::Base
def all_pipelines
return Ci::Pipeline.none unless source_project
- commit_shas = all_commits.unscope(:limit).select(:sha)
@all_pipelines ||= source_project.pipelines
- .where(sha: commit_shas, ref: source_branch)
+ .where(sha: all_commit_shas, ref: source_branch)
.order(id: :desc)
end