From f99cf205800e1ee0084622022570afbbf868c2cd Mon Sep 17 00:00:00 2001 From: Zaid Abdulla Date: Wed, 6 Jan 2016 22:40:24 +0300 Subject: [PATCH] Fix bug preventing saving of boot and bootstrap timestamps --- lib/update-device.coffee | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/update-device.coffee b/lib/update-device.coffee index 5c5d9d9..3f5ed41 100644 --- a/lib/update-device.coffee +++ b/lib/update-device.coffee @@ -53,8 +53,8 @@ commitUpdates = (deviceId, deviceUpdates, commitQueue, callback) -> processBatch = (updatesBatch, cb) -> if updatesBatch.informEvents? update['$set']['_lastInform'] = now - update['$set']['_lastBoot'] if '1 BOOT' in updatesBatch.informEvents - update['$set']['_lastBootstrap'] if '0 BOOTSTRAP' in updatesBatch.informEvents + update['$set']['_lastBoot'] = now if '1 BOOT' in updatesBatch.informEvents + update['$set']['_lastBootstrap'] = now if '0 BOOTSTRAP' in updatesBatch.informEvents if updatesBatch.parameterValues? for p in updatesBatch.parameterValues