From ae33e57d1bb94827f488374a7dba8a96fa8e541f Mon Sep 17 00:00:00 2001 From: Luke Kanies Date: Mon, 10 Dec 2007 12:16:08 -0600 Subject: 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. --- lib/puppet/rails/host.rb | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'lib/puppet') 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 } -- cgit