From 89e78b13355c440bf5960e3e776d710e2ab9c6e0 Mon Sep 17 00:00:00 2001 From: Zaid Abdulla Date: Mon, 29 Aug 2016 20:00:32 -0700 Subject: [PATCH] Fix bug when fetching entire device data model --- lib/db.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/db.coffee b/lib/db.coffee index 194cda8..02863a9 100644 --- a/lib/db.coffee +++ b/lib/db.coffee @@ -429,7 +429,7 @@ fetchDevice = (id, timestamp, patterns, callback) -> {exist: timestamp, object: timestamp, writable: timestamp, value: timestamp}, {exist: 1, object: 0, writable: 0, value: [vv, 'xsd:boolean']}]) else if common.typeOf(v) is common.OBJECT_TYPE - storeParams(v, [k], +(device['_timestamp'] ? 0), projection == null) + storeParams(v, [k], +(device['_timestamp'] ? 0), Object.keys(projection).length == 0) return callback(null, res, loaded) )