Update dependencies

This commit is contained in:
Zaid Abdulla committed 2016-03-06 06:19:50 +03:00
1 parent c3a956ad27
commit dff95c3c80
5 files changed
+22 -19

No files matched your search

+2 -2
View File
@@ -468,8 +468,8 @@ saveDevice = (deviceId, diff, isNew, callback) ->
return callback() if Object.keys(update).length == 0
devicesCollection.update({'_id' : deviceId}, update, {upsert: isNew}, (err, count) =>
if not err and count != 1
devicesCollection.update({'_id' : deviceId}, update, {upsert: isNew}, (err, result) ->
if not err and result.result.n != 1
return callback(new Error("Device #{deviceId} not found in database"))
return callback(err)