Skip to content

Commit

Permalink
check config ngsi version
Browse files Browse the repository at this point in the history
  • Loading branch information
AlvaroVega committed Jun 29, 2023
1 parent 2e9b6a5 commit f69f1ed
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/services/devices/deviceService.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ function init() {
* @param {Object} newDevice Device object that will be stored in the database.
*/
function createInitialEntity(deviceData, newDevice, callback) {
if (config.getConfig().appendMode === false || deviceData.ngsiVersion === 'ld') {
if (config.getConfig().appendMode === false || config.ngsiVersion() === 'ld' || deviceData.ngsiVersion === 'ld') {
deviceHandler.createInitialEntity(deviceData, newDevice, callback);
} else {
logger.debug(context, 'Skip create nitial entity created for appendMode.');
Expand Down

0 comments on commit f69f1ed

Please sign in to comment.