Fixed issue where no projection is applied when there's no presets thus affecting performane
This commit is contained in:
1 parent
c08fb47f18
commit
28f63e8c96
2 files changed
+2
-1
No files matched your search
+1
-1
@@ -66,7 +66,7 @@ matchObject = (object, param) ->
|
||||
exports.assertPresets = (deviceId, presetsHash, callback) ->
|
||||
getPresets((presets, objects) ->
|
||||
# only fetch relevant params
|
||||
projection = {}
|
||||
projection = {_id : 1}
|
||||
for p in presets
|
||||
p.precondition = query.expand(p.precondition)
|
||||
mongoQuery.projection(p.precondition, projection)
|
||||
|
||||
Reference in new issue
Block a user