Merge branch 'bug/MSP-10724/fix-import-failure' into staging/electro-release MSP-10724 #land

bug/bundler_fix
Kyle Gray 2014-07-17 13:37:13 -05:00
commit 08cd2690f9
No known key found for this signature in database
GPG Key ID: 5F604D93CA5FEE1A
1 changed files with 1 additions and 11 deletions

View File

@ -1372,8 +1372,6 @@ class DBManager
=end
ntype = opts.delete(:type) || opts.delete(:ntype) || (raise RuntimeError, "A note :type or :ntype is required")
data = opts[:data]
method = nil
args = []
note = nil
conditions = { :ntype => ntype }
@ -1382,15 +1380,7 @@ class DBManager
case mode
when :unique
notes = wspace.notes.where(conditions)
# Only one note of this type should exist, make a new one if it
# isn't there. If it is, grab it and overwrite its data.
if notes.empty?
note = wspace.notes.new(conditions)
else
note = notes[0]
end
note = wspace.notes.where(conditions).first_or_initialize
note.data = data
when :unique_data
notes = wspace.notes.where(conditions)