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, 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",