From eaa26db89abe04eb7a3010956c547ad81fea2e3c Mon Sep 17 00:00:00 2001 From: Vokhmin Alexey V Date: Mon, 17 Dec 2012 18:50:09 +0400 Subject: [PATCH] #778: remove unnecessary code --- app/models/project.rb | 1 + app/models/project_to_repository.rb | 3 --- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/app/models/project.rb b/app/models/project.rb index c9b6b80be..8759e65ed 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -216,6 +216,7 @@ class Project < ActiveRecord::Base packages = packages.scoped_to_arch(arch.id). includes(:packages).last(10). map{ |bl| bl.packages.pluck(:fullname) }.flatten + next if packages.empty? Resque.push( "publish_build_list_container_#{type}_worker", 'class' => "AbfWorker::PublishBuildListContainer#{type.capitalize}Worker", diff --git a/app/models/project_to_repository.rb b/app/models/project_to_repository.rb index a9bce258a..3e7addb13 100644 --- a/app/models/project_to_repository.rb +++ b/app/models/project_to_repository.rb @@ -5,10 +5,7 @@ class ProjectToRepository < ActiveRecord::Base delegate :path, :to => :project - after_create lambda { project.xml_rpc_create(repository) }, :unless => lambda {Thread.current[:skip]} after_destroy lambda { project.destroy_project_from_repository(repository) } - # after_destroy lambda { project.xml_rpc_destroy(repository) }, :unless => lambda {Thread.current[:skip]} - # after_rollback lambda { project.xml_rpc_destroy(repository) rescue true if new_record? } validate :one_project_in_platform_repositories