Land #2136 - Removed requirement for note.data to be present

bug/bundler_fix
sinn3r 2013-08-09 15:29:25 -05:00
commit 4558aca7ca
1 changed files with 2 additions and 2 deletions

View File

@ -1283,13 +1283,13 @@ class DBManager
# Report a Note to the database. Notes can be tied to a ::Mdm::Workspace, Host, or Service. # Report a Note to the database. Notes can be tied to a ::Mdm::Workspace, Host, or Service.
# #
# opts MUST contain # opts MUST contain
# +:data+:: whatever it is you're making a note of
# +:type+:: The type of note, e.g. smb_peer_os # +:type+:: The type of note, e.g. smb_peer_os
# #
# opts can contain # opts can contain
# +:workspace+:: the workspace to associate with this Note # +:workspace+:: the workspace to associate with this Note
# +:host+:: an IP address or a Host object to associate with this Note # +:host+:: an IP address or a Host object to associate with this Note
# +:service+:: a Service object to associate with this Note # +:service+:: a Service object to associate with this Note
# +:data+:: whatever it is you're making a note of
# +:port+:: along with +:host+ and +:proto+, a service to associate with this Note # +:port+:: along with +:host+ and +:proto+, a service to associate with this Note
# +:proto+:: along with +:host+ and +:port+, a service to associate with this Note # +:proto+:: along with +:host+ and +:port+, a service to associate with this Note
# +:update+:: what to do in case a similar Note exists, see below # +:update+:: what to do in case a similar Note exists, see below
@ -1369,7 +1369,7 @@ class DBManager
end end
=end =end
ntype = opts.delete(:type) || opts.delete(:ntype) || (raise RuntimeError, "A note :type or :ntype is required") ntype = opts.delete(:type) || opts.delete(:ntype) || (raise RuntimeError, "A note :type or :ntype is required")
data = opts[:data] || (raise RuntimeError, "Note :data is required") data = opts[:data]
method = nil method = nil
args = [] args = []
note = nil note = nil