diff options
author | Kamil Trzcinski <ayufan@ayufan.eu> | 2016-06-03 15:35:16 +0200 |
---|---|---|
committer | Kamil Trzcinski <ayufan@ayufan.eu> | 2016-06-03 15:49:14 +0200 |
commit | 9423547f6181bc7e4c9c32e86bd7f72b4c094de0 (patch) | |
tree | 306d9bca32e9924268065f5d14ef57c37f301804 /app | |
parent | 4d5f7aa00827f425dd3d2c3bd5a395c8e948f0ba (diff) | |
download | gitlab-ce-9423547f6181bc7e4c9c32e86bd7f72b4c094de0.tar.gz |
Fix other places where we still use commit attribute of Build
Diffstat (limited to 'app')
-rw-r--r-- | app/controllers/projects/commit_controller.rb | 6 | ||||
-rw-r--r-- | app/models/ci/pipeline.rb | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/app/controllers/projects/commit_controller.rb b/app/controllers/projects/commit_controller.rb index 287388652e6..737e6c931f7 100644 --- a/app/controllers/projects/commit_controller.rb +++ b/app/controllers/projects/commit_controller.rb @@ -104,7 +104,7 @@ class Projects::CommitController < Projects::ApplicationController end def ci_builds - @ci_builds ||= Ci::Build.where(commit: ci_commits) + @ci_builds ||= Ci::Build.where(pipeline: ci_commits) end def define_show_vars @@ -117,8 +117,8 @@ class Projects::CommitController < Projects::ApplicationController @diff_refs = [commit.parent || commit, commit] @notes_count = commit.notes.count - @statuses = CommitStatus.where(commit: ci_commits) - @builds = Ci::Build.where(commit: ci_commits) + @statuses = CommitStatus.where(pipeline: ci_commits) + @builds = Ci::Build.where(pipeline: ci_commits) end def assign_change_commit_vars(mr_source_branch) diff --git a/app/models/ci/pipeline.rb b/app/models/ci/pipeline.rb index 9352c6f325a..9b5b46f4928 100644 --- a/app/models/ci/pipeline.rb +++ b/app/models/ci/pipeline.rb @@ -23,7 +23,7 @@ module Ci def self.stages # We use pluck here due to problems with MySQL which doesn't allow LIMIT/OFFSET in queries - CommitStatus.where(commit: pluck(:id)).stages + CommitStatus.where(pipeline: pluck(:id)).stages end def project_id |