From 9ecd26885b3e9e845e05a514928d7ec418ed08c9 Mon Sep 17 00:00:00 2001 From: Vokhmin Alexey V Date: Mon, 18 Feb 2013 20:53:54 +0400 Subject: [PATCH] #757: find build_list with container --- app/controllers/projects/build_lists_controller.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/controllers/projects/build_lists_controller.rb b/app/controllers/projects/build_lists_controller.rb index f2aac51cd..5aa1e8349 100644 --- a/app/controllers/projects/build_lists_controller.rb +++ b/app/controllers/projects/build_lists_controller.rb @@ -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