From 71a93292efc2d6713695a04b0623a04c6ace1a6e Mon Sep 17 00:00:00 2001 From: Alvaro Vega Date: Mon, 2 Oct 2023 13:52:45 +0200 Subject: [PATCH 1/2] apply for all id of entities --- lib/services/ngsi/entities-NGSI-v2.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/services/ngsi/entities-NGSI-v2.js b/lib/services/ngsi/entities-NGSI-v2.js index fb668f3c0..d593b50a6 100644 --- a/lib/services/ngsi/entities-NGSI-v2.js +++ b/lib/services/ngsi/entities-NGSI-v2.js @@ -343,7 +343,8 @@ function sendUpdateValueNgsi2(entityName, attributes, typeInformation, token, ca const payload = { entities: [ { - id: entityName + // CB entity id should be always a String + id: String(entityName) } ] }; @@ -677,8 +678,9 @@ function sendUpdateValueNgsi2(entityName, attributes, typeInformation, token, ca logger.debug(context, 'sendUpdateValueNgsi2 entityNameExp %j ', typeInformation.entityNameExp); entityName = expressionPlugin.applyExpression(typeInformation.entityNameExp, ctxt, typeInformation); // CB entity id should be always a String - payload.entities[0].id = String(entityName); - ctxt['entity_name'] = String(entityName); + entityName = String(entityName); + payload.entities[0].id = entityName; + ctxt['entity_name'] = entityName; } catch (e) { logger.debug( context, From 948e8f712f741986be1595f250257552c9ed9b88 Mon Sep 17 00:00:00 2001 From: Alvaro Vega Date: Mon, 2 Oct 2023 13:57:40 +0200 Subject: [PATCH 2/2] bump 3.4.2 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 5ba1efa20..821ede4b0 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "iotagent-node-lib", "license": "AGPL-3.0-only", "description": "IoT Agent library to interface with NGSI Context Broker", - "version": "3.4.1", + "version": "3.4.2", "homepage": "https://github.com/telefonicaid/iotagent-node-lib", "keywords": [ "fiware",