Commit 2b8f04a6 authored by Grzegorz Bizon's avatar Grzegorz Bizon

Remove redundant check in commit builds API endpoint

parent 087f0808
...@@ -36,8 +36,6 @@ module API ...@@ -36,8 +36,6 @@ module API
return not_found! unless user_project.commit(params[:sha]) return not_found! unless user_project.commit(params[:sha])
pipelines = user_project.pipelines.where(sha: params[:sha]) pipelines = user_project.pipelines.where(sha: params[:sha])
return [] if pipelines.empty?
builds = user_project.builds.where(pipeline: pipelines).order('id DESC') builds = user_project.builds.where(pipeline: pipelines).order('id DESC')
builds = filter_builds(builds, params[:scope]) builds = filter_builds(builds, params[:scope])
......
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