diff options
author | Luke Kanies <luke@madstop.com> | 2007-12-10 12:16:08 -0600 |
---|---|---|
committer | Luke Kanies <luke@madstop.com> | 2007-12-10 12:16:08 -0600 |
commit | ae33e57d1bb94827f488374a7dba8a96fa8e541f (patch) | |
tree | 471a42b819a3c64978497d04580ef14b5ccbc76e /lib | |
parent | 9ad7d1a7255a89383bc2b8c6b72c79bc050945a3 (diff) | |
download | puppet-ae33e57d1bb94827f488374a7dba8a96fa8e541f.tar.gz puppet-ae33e57d1bb94827f488374a7dba8a96fa8e541f.tar.xz puppet-ae33e57d1bb94827f488374a7dba8a96fa8e541f.zip |
Fixing #923 (again). The host storage method was not
correctly searching for the host, so it was creating
a new host on each run, which is what was causing the
conflict.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/puppet/rails/host.rb | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/puppet/rails/host.rb b/lib/puppet/rails/host.rb index 9ecacdd6f..72898fd97 100644 --- a/lib/puppet/rails/host.rb +++ b/lib/puppet/rails/host.rb @@ -29,15 +29,13 @@ class Puppet::Rails::Host < ActiveRecord::Base # Store our host in the database. def self.store(node, resources) - raise ArgumentError, "You must specify the hostname for storage" unless name = hash[:name] - args = {} host = nil transaction do #unless host = find_by_name(name) seconds = Benchmark.realtime { - unless host = find_by_name(name) + unless host = find_by_name(node.name) host = new(:name => node.name) end } |