#757: find build_list with container

This commit is contained in:
Vokhmin Alexey V 2013-02-18 20:53:54 +04:00
parent cab6a7ab56
commit 9ecd26885b
1 changed files with 2 additions and 1 deletions

View File

@ -124,7 +124,8 @@ class Projects::BuildListsController < Projects::BaseController
def add_extra
if params[:extra_id] =~ /-build-list$/
subject = BuildList.find(params[:extra_id].gsub(/-build-list$/, ''))
id = params[:extra_id].gsub(/-build-list$/, '')
subject = BuildList.where(id: id, container_status: BuildList::BUILD_PUBLISHED).first
else
subject = Repository.find params[:extra_id]
end