From ca24de30b9098d081b553563502e73afb71c118a Mon Sep 17 00:00:00 2001 From: Vokhmin Alexey V Date: Tue, 25 Dec 2012 20:01:44 +0400 Subject: [PATCH] fix for creating mass_build --- app/models/mass_build.rb | 2 +- app/models/project.rb | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/app/models/mass_build.rb b/app/models/mass_build.rb index 6b5a46c31..e5cce8fc3 100644 --- a/app/models/mass_build.rb +++ b/app/models/mass_build.rb @@ -50,7 +50,7 @@ class MassBuild < ActiveRecord::Base sleep 1 end end - later :build_all, :loner => true, :queue => :clone_build + later :build_all, :queue => :clone_build def generate_failed_builds_list report = "" diff --git a/app/models/project.rb b/app/models/project.rb index 56f67c54a..fd07b292c 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -137,7 +137,7 @@ class Project < ActiveRecord::Base main_rep_id = platform.repositories.find_by_name('main').try(:id) build_reps_ids = [main_rep_id, repository_id].compact.uniq - build_lists.create do |bl| + build_list = build_lists.build do |bl| bl.save_to_platform = platform bl.build_for_platform = platform bl.update_type = 'newpackage' @@ -151,6 +151,7 @@ class Project < ActiveRecord::Base bl.save_to_repository_id = repository_id bl.new_core = new_core end + build_list.save end def fork(new_owner)