From 74db44a64a1018af1396c69405d13762cddeab11 Mon Sep 17 00:00:00 2001 From: MaksimChepelev Date: Thu, 15 Nov 2018 15:50:00 +0300 Subject: [PATCH] bluetooth and microservice creation on fog update fix: (#362) 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() };