BigW Consortium Gitlab

Commit fab8bc53 by Lin Jen-Shin
parent 55448528
...@@ -430,13 +430,13 @@ class Project < ActiveRecord::Base ...@@ -430,13 +430,13 @@ class Project < ActiveRecord::Base
end end
def builds_for(build_name, ref = 'HEAD') def builds_for(build_name, ref = 'HEAD')
ct = commit(ref) commit_object = commit(ref)
if ct.nil? if commit_object.nil?
builds.none builds.none
else else
builds.joins(:pipeline). builds.joins(:pipeline).
merge(Ci::Pipeline.where(sha: ct.sha)). merge(Ci::Pipeline.where(sha: commit_object.sha)).
where(name: build_name) where(name: build_name)
end end
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