From 9423547f6181bc7e4c9c32e86bd7f72b4c094de0 Mon Sep 17 00:00:00 2001 From: Kamil Trzcinski Date: Fri, 3 Jun 2016 15:35:16 +0200 Subject: Fix other places where we still use commit attribute of Build --- app/controllers/projects/commit_controller.rb | 6 +++--- app/models/ci/pipeline.rb | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'app') 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 -- cgit v1.2.3