From bed13eb01cd390975e43f90077e733498207d604 Mon Sep 17 00:00:00 2001 From: Vokhmin Alexey V Date: Tue, 2 Jun 2015 21:28:35 +0300 Subject: [PATCH] #472: Fixed: loose some params at re-creation of build_list. --- app/controllers/projects/build_lists_controller.rb | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/app/controllers/projects/build_lists_controller.rb b/app/controllers/projects/build_lists_controller.rb index 8b741f903..c0e0f372a 100644 --- a/app/controllers/projects/build_lists_controller.rb +++ b/app/controllers/projects/build_lists_controller.rb @@ -233,17 +233,8 @@ class Projects::BuildListsController < Projects::BaseController def create_from_build_list return if params[:build_list_id].blank? build_list = @project.build_lists.find(params[:build_list_id]) - - params[:build_list] ||= {} - policy(BuildList).permitted_attributes.each do |key| - params[:build_list][key] = - if build_list.respond_to?(key) - build_list.send(key) - elsif build_list.respond_to?("#{key}?") - build_list.send("#{key}?") - end - end - params[:arches] = [build_list.arch_id] + params[:build_list] = build_list.attributes + params[:arches] = [build_list.arch_id] [:owner_filter, :status_filter].each { |t| params[t] = 'true' if %w(true undefined).exclude? params[t] } end end