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 --- lib/api/commit_statuses.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib/api/commit_statuses.rb') diff --git a/lib/api/commit_statuses.rb b/lib/api/commit_statuses.rb index 7fc83380764..088d5bac587 100644 --- a/lib/api/commit_statuses.rb +++ b/lib/api/commit_statuses.rb @@ -23,7 +23,7 @@ module API not_found!('Commit') unless user_project.commit(params[:sha]) ci_commits = user_project.pipelines.where(sha: params[:sha]) - statuses = ::CommitStatus.where(commit: ci_commits) + statuses = ::CommitStatus.where(pipeline: ci_commits) statuses = statuses.latest unless parse_boolean(params[:all]) statuses = statuses.where(ref: params[:ref]) if params[:ref].present? statuses = statuses.where(stage: params[:stage]) if params[:stage].present? @@ -67,8 +67,8 @@ module API ci_commit = @project.ensure_pipeline(commit.sha, ref) name = params[:name] || params[:context] - status = GenericCommitStatus.running_or_pending.find_by(commit: ci_commit, name: name, ref: params[:ref]) - status ||= GenericCommitStatus.new(project: @project, commit: ci_commit, user: current_user) + status = GenericCommitStatus.running_or_pending.find_by(pipeline: ci_commit, name: name, ref: params[:ref]) + status ||= GenericCommitStatus.new(project: @project, pipeline: ci_commit, user: current_user) status.update(attrs) case params[:state].to_s -- cgit v1.2.1