Clone controller_target_ids too.

Akinori MUSHA 10 years ago
parent
commit
706ce8d997
1 changed files with 2 additions and 1 deletions
  1. 2 1
      app/models/agent.rb

+ 2 - 1
app/models/agent.rb

@@ -268,7 +268,8 @@ class Agent < ActiveRecord::Base
268 268
 
269 269
   class << self
270 270
     def build_clone(original)
271
-      new(original.slice(:type, :options, :schedule, :controller_ids, :source_ids, :keep_events_for, :propagate_immediately)) { |clone|
271
+      new(original.slice(:type, :options, :schedule, :controller_ids, :control_target_ids,
272
+                         :source_ids, :keep_events_for, :propagate_immediately)) { |clone|
272 273
         # Give it a unique name
273 274
         2.upto(count) do |i|
274 275
           name = '%s (%d)' % [original.name, i]