Dont array wrap refs

GSoC/Meterpreter_Web_Console
James Barnett 2019-01-03 10:47:27 -06:00
parent b875d391fc
commit 1b29e17827
No known key found for this signature in database
GPG Key ID: 647983861A4EC5EA
1 changed files with 3 additions and 3 deletions

View File

@ -7,11 +7,11 @@ module Msf::DBManager::Ref
::ActiveRecord::Base.connection_pool.with_connection {
if opts[:id] && !opts[:id].to_s.empty?
return Array.wrap(Mdm::Ref.find(opts[:id]))
return Mdm::Ref.find(opts[:id])
end
if opts[:ref]
return Array.wrap(get_ref(opts[:name]))
return get_ref(opts[:name])
end
ref = ::Mdm::Ref.where(name: opts[:name]).first_or_initialize
@ -26,7 +26,7 @@ module Msf::DBManager::Ref
if ref and ref.changed?
ref.save!
end
Array.wrap(ref)
ref
}
end