Fix a mangled merge that prevent imported vulns from being registered in some cases
This commit is contained in:
parent
82b8042d2d
commit
0367b7b3f2
|
@ -1290,20 +1290,23 @@ class DBManager
|
|||
raise ArgumentError.new("Deprecated data column for vuln, use .info instead") if opts[:data]
|
||||
name = opts[:name] || return
|
||||
info = opts[:info]
|
||||
|
||||
::ActiveRecord::Base.connection_pool.with_connection {
|
||||
|
||||
wspace = opts.delete(:workspace) || workspace
|
||||
exploited_at = opts[:exploited_at] || opts["exploited_at"]
|
||||
rids = nil
|
||||
|
||||
if opts[:refs]
|
||||
rids = []
|
||||
opts[:refs].each do |r|
|
||||
if (r.respond_to?(:ctx_id)) and (r.respond_to?(:ctx_val))
|
||||
r = "#{r.ctx_id}-#{r.ctx_val}"
|
||||
rids << find_or_create_ref(:name => r)
|
||||
end
|
||||
rids << find_or_create_ref(:name => r)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
host = nil
|
||||
addr = nil
|
||||
if opts[:host].kind_of? ::Mdm::Host
|
||||
|
|
Loading…
Reference in New Issue