Commit 5c1f75e9 authored by Lin Jen-Shin's avatar Lin Jen-Shin

Use ci_commits.gl_project_id instead of ci_builds.gl_project_id:

Feedback:
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/5142#note_13125513
parent cc91f09a
......@@ -437,10 +437,11 @@ class Project < ActiveRecord::Base
commit_object = commit(ref)
if commit_object.nil?
builds.none
Ci::Build.none
else
builds.joins(:pipeline).
merge(Ci::Pipeline.where(sha: commit_object.sha))
Ci::Build.joins(:pipeline).
merge(Ci::Pipeline.where(sha: commit_object.sha,
project: self))
end
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment