[#242] fix last refactoring of the controller

This commit is contained in:
Alexander Machehin 2013-08-05 17:21:30 +06:00
parent 8de9411203
commit 541e1ebbe5
1 changed files with 2 additions and 2 deletions

View File

@ -167,7 +167,7 @@ class Projects::BuildListsController < Projects::BaseController
end end
def create_from_build_list def create_from_build_list
return if params[:build_list_id] return if params[:build_list_id].blank?
@build_list = BuildList.find params[:build_list_id] @build_list = BuildList.find params[:build_list_id]
params[:build_list] ||= {} params[:build_list] ||= {}
@ -175,7 +175,7 @@ class Projects::BuildListsController < Projects::BaseController
:project_version, :update_type, :auto_create_container, :project_version, :update_type, :auto_create_container,
:extra_repositories, :extra_build_lists] :extra_repositories, :extra_build_lists]
keys.each { |key| params[:build_list][key] = @build_list.send(key) } keys.each { |key| params[:build_list][key] = @build_list.send(key) }
params[:arches] = [build_list.arch_id.to_s] params[:arches] = [@build_list.arch_id.to_s]
[:owner_filter, :status_filter].each { |t| params[t] = 'true' if %w(true undefined).exclude? params[t] } [:owner_filter, :status_filter].each { |t| params[t] = 'true' if %w(true undefined).exclude? params[t] }
end end
end end