Skip to content

Commit c07889b

Browse files
authored
Merge pull request #946 from telefonicaid/revert-945-revert-942-task/default_attribute_value_null_instead_blank
Task/default attribute value null instead blank
2 parents 1f5b396 + cd40d08 commit c07889b

File tree

44 files changed

+185
-183
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+185
-183
lines changed

CHANGES_NEXT_RELEASE

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
Use null instead of ' ' as default attribute value in entity provisioned (#938)
12
Add: defaultEntityNameConjunction config (env var IOTA_DEFAULT_ENTITY_NAME_CONJUNCTION) and configuration group API field for default entity_name conjunction (#944)
23
Add basic NGSI-LD support as experimental feature (#842)
34
- Active measures

lib/constants.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525

2626
const LOCATION_DEFAULT = '0, 0';
2727
const DATETIME_DEFAULT = '1970-01-01T00:00:00.000Z';
28-
const ATTRIBUTE_DEFAULT = ' ';
28+
const ATTRIBUTE_DEFAULT = null;
2929

3030
/**
3131
* Provides a default value for DateTime, GeoProperty and Property Attributes.
@@ -82,6 +82,7 @@ module.exports = {
8282
MONGO_ALARM: 'MONGO-ALARM',
8383
ORION_ALARM: 'ORION-ALARM',
8484
IOTAM_ALARM: 'IOTAM-ALARM',
85+
8586
ATTRIBUTE_DEFAULT,
8687
DATETIME_DEFAULT,
8788

test/unit/examples/contextRequests/createMinimumProvisionedDevice.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
{
99
"name": "attr_name",
1010
"type": "string",
11-
"value": " "
11+
"value": null
1212
}
1313
]
1414
}

test/unit/examples/contextRequests/createProvisionedDevice.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
{
99
"name": "attr_name",
1010
"type": "string",
11-
"value": " "
11+
"value": null
1212
},
1313
{
1414
"name": "hardcodedAttr",

test/unit/examples/contextRequests/createProvisionedDeviceMultientity.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
{
99
"name": "attr_name",
1010
"type": "string",
11-
"value": " "
11+
"value": null
1212
},
1313
{
1414
"name": "hardcodedAttr",

test/unit/examples/contextRequests/createProvisionedDeviceWithGroup.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@
88
{
99
"name": "attr_name",
1010
"type": "string",
11-
"value": " "
11+
"value": null
1212
},
1313
{
1414
"name": "status",
1515
"type": "Boolean",
16-
"value": " "
16+
"value": null
1717
},
1818
{
1919
"name": "hardcodedAttr",

test/unit/examples/contextRequests/createProvisionedDeviceWithGroupAndStatic.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@
88
{
99
"name": "attr_name",
1010
"type": "string",
11-
"value": " "
11+
"value": null
1212
},
1313
{
1414
"name": "status",
1515
"type": "Boolean",
16-
"value": " "
16+
"value": null
1717
},
1818
{
1919
"name": "hardcodedAttr",

test/unit/examples/contextRequests/createProvisionedDeviceWithGroupAndStatic2.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@
88
{
99
"name": "attr_name",
1010
"type": "string",
11-
"value": " "
11+
"value": null
1212
},
1313
{
1414
"name": "status",
1515
"type": "Boolean",
16-
"value": " "
16+
"value": null
1717
},
1818
{
1919
"name": "hardcodedAttr",

test/unit/examples/contextRequests/createTimeinstantDevice.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
{
99
"name": "TimeInstant",
1010
"type": "ISO8601",
11-
"value": " "
11+
"value": null
1212
}
1313
]
1414
}

test/unit/examples/contextRequests/updateContext5.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@
66
"attributes": [{
77
"name": "state",
88
"type": "Boolean",
9-
"value": " "
9+
"value": null
1010
},
1111
{
1212
"name": "dimming",
1313
"type": "Percentage",
14-
"value": " "
14+
"value": null
1515
}
1616
]
1717
}],
1818
"updateAction": "APPEND"
19-
}
19+
}

0 commit comments

Comments
 (0)