#369: Fixed: missed variables at recreate action

This commit is contained in:
Vokhmin Alexey V 2014-12-02 01:44:11 +03:00
parent e21ce73e89
commit 676b703109
3 changed files with 8 additions and 9 deletions

View File

@ -137,7 +137,8 @@ NewBuildListController = (dataservice, $http) ->
false
vm.addExtraBuildList = ->
vm.extra_build_lists = _.union(vm.extra_build_lists, [vm.selected_extra_build_list])
if vm.selected_extra_build_list && vm.selected_extra_build_list.id
vm.extra_build_lists = _.union(vm.extra_build_lists, [vm.selected_extra_build_list])
vm.selected_extra_build_list = null
false

View File

@ -231,7 +231,8 @@ class Projects::BuildListsController < Projects::BaseController
:save_to_repository_id, :auto_publish_status, :include_repos,
:extra_params, :project_version, :update_type, :auto_create_container,
:extra_repositories, :extra_build_lists, :build_for_platform_id,
:use_cached_chroot, :use_extra_tests, :save_buildroot
:use_cached_chroot, :use_extra_tests, :save_buildroot,
:include_testing_subrepository, :external_nodes
]
keys.each { |key| params[:build_list][key] = build_list.send(key) }
params[:arches] = [build_list.arch_id]

View File

@ -207,7 +207,7 @@ module BuildListsHelper
end
def is_repository_checked(repo, params)
include_repos(params).include? repo.id
include_repos(params).include? repo.id.to_s
end
private
@ -244,18 +244,15 @@ module BuildListsHelper
end
def include_repos(params)
return @include_repos if @include_repos
@include_repos = params.try(:[], :build_list).try(:[], :include_repos) || []
@include_repos ||= params.try(:[], :build_list).try(:[], :include_repos) || []
end
def save_to_repository_id(params)
return @save_to_repository_id if @save_to_repository_id
@save_to_repository_id = params[:build_list].try(:[], :save_to_repository_id)
@save_to_repository_id ||= params[:build_list].try(:[], :save_to_repository_id).to_i
end
def project_version(project, params)
return @project_version if @project_version
@project_version = params[:build_list].try(:[], :project_version) || project.default_branch
@project_version ||= params[:build_list].try(:[], :project_version) || project.default_branch
end
def build_list_project_versions(project)