Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

host category for nodes in the simple xml

  • Loading branch information...
commit 44e772709db6d551ce0647e4cceaaaf23c386a36 1 parent 7c36a7b
cktricky authored
Showing with 3 additions and 3 deletions.
  1. +3 −3 vendor/plugins/nexpose_upload/lib/nexpose_upload/filters.rb
View
6 vendor/plugins/nexpose_upload/lib/nexpose_upload/filters.rb
@@ -42,8 +42,7 @@ def self.import(params={})
def self.notes_simple(hosts)
return if hosts.nil?
hosts.each do |host|
- host_node = Node.create(:label => host['address'], :parent_id => @nexpose_node.id)
-
+ host_node = @nexpose_node.children.find_or_create_by_label_and_type_id(host['address'], Node::Types::HOST)
Note.create(
:node => host_node,
:author => @plugin_author_name,
@@ -443,4 +442,5 @@ def self.parse_nexpose_full_xml(doc)
return details
end # self.parse_nexpose_full_xml ends
-end
+end
+
Please sign in to comment.
Something went wrong with that request. Please try again.