Fixed bug where presets don't get applied when there's overlapping field projection in mongodb query

This commit is contained in:
Zaid Abdulla committed 2013-07-29 23:40:20 +03:00
1 parent 0b596487a5
commit b61b746db4
2 files changed
+13

No files matched your search

+1
View File
@@ -84,6 +84,7 @@ exports.assertPresets = (deviceId, presetsHash, callback) ->
else
throw new Error('Unknown configuration type')
mongoQuery.optimizeProjection(projection)
db.devicesCollection.findOne({'_id' : deviceId}, projection, (err, device) ->
devicePresets = []
for p in presets