From db20ff2fc3ee10ea935047e4a751f2a822f24fcb Mon Sep 17 00:00:00 2001 From: maksimchepelev Date: Thu, 15 Nov 2018 15:04:28 +0300 Subject: [PATCH] bluetooth and microservice creation on fog update fix: if trying to update fog from cli then userId for bluetooth or hal microservices got from oldFog data instead of user obj? which doesn't exists in cli call --- src/services/iofog-service.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/services/iofog-service.js b/src/services/iofog-service.js index 94e078e40..270fad60a 100644 --- a/src/services/iofog-service.js +++ b/src/services/iofog-service.js @@ -174,7 +174,7 @@ async function _updateFog(fogData, user, isCli, transaction) { iofogUuid: fogData.uuid, rootHostAccess: true, logSize: 50, - userId: user.id, + userId: isCli ? oldFog.userId : user.id, configLastUpdated: Date.now() }; @@ -206,7 +206,7 @@ async function _updateFog(fogData, user, isCli, transaction) { iofogUuid: fogData.uuid, rootHostAccess: true, logSize: 50, - userId: user.id, + userId: isCli ? oldFog.userId : user.id, configLastUpdated: Date.now() };