Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,4 @@ spec/reports
test/tmp
test/version_tmp
tmp
.idea
3 changes: 1 addition & 2 deletions app/mongo/lib/mongo_adaptor_server.rb
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,8 @@ def update(collection, values)
end

to_mongo_id!(values)
# TODO: Seems mongo is dumb and doesn't let you upsert with custom id's
begin
db[collection].insert_one(values)
db[collection].update_one({'_id' => values['_id']}, values, {upsert: true})
rescue => error
# Really mongo client?
msg = error.message
Expand Down