From 9ba16064a14f8aca00476fa1e27452d7ded68248 Mon Sep 17 00:00:00 2001 From: Alvaro Vega Date: Tue, 5 Sep 2023 13:09:12 +0200 Subject: [PATCH] update CNR --- CHANGES_NEXT_RELEASE | 2 +- lib/iotaUtils.js | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CHANGES_NEXT_RELEASE b/CHANGES_NEXT_RELEASE index 8b137891..e0278fdb 100644 --- a/CHANGES_NEXT_RELEASE +++ b/CHANGES_NEXT_RELEASE @@ -1 +1 @@ - +- Ensure device apikey in already provisioned device (iota-node-lib#1430) diff --git a/lib/iotaUtils.js b/lib/iotaUtils.js index b6fd2cde..2b2df76e 100644 --- a/lib/iotaUtils.js +++ b/lib/iotaUtils.js @@ -147,7 +147,9 @@ function findOrCreate(deviceId, transport, group, callback) { 'apikey' in group && group.apikey !== undefined ) { - logger.info(context, 'Update provisioned device %j with measure/group apikey %j', device, group.apikey); + config + .getLogger() + .info(context, 'Update provisioned device %j with measure/group apikey %j', device, group.apikey); device.apikey = group.apikey; // group apikey is the same of current measure apikey iotAgentLib.updateRegister(device, function (error, device) { callback(error, device, group);