Remove redundant check in commit builds API endpoint

This commit is contained in:
Grzegorz Bizon 2016-06-28 17:15:38 +02:00
parent 087f080871
commit 2b8f04a669

View file

@ -36,8 +36,6 @@ module API
return not_found! unless user_project.commit(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 = filter_builds(builds, params[:scope])