Wrong attribute format
Closed this issue · 2 comments
Cedrok commented
If we create an attribute with a dot in its name, it will create a wrongly formatted attribute ( [name]:[attrP1].[attrP2]=[value] )
DEMO.ALPHA.B.R1.A01:Chassis1.color=C4D7ED
{
"data": {
"attributes": {
"Chassis1": {
"color": "C4D7ED"
},
"height": "42",
"heightUnit": "U",
"model": "someModel",
"orientation": "front",
"posXY": "{\"x\":1 ,\"y\":1 }",
"posXYUnit": "t",
"serial": "someSerial",
"size": "{\"x\":60 ,\"y\":120 }",
"sizeUnit": "cm",
"template": "",
"type": "someType",
"vendor": "someVendor"
},
"category": "rack",
"createdDate": "2022-11-04T10:21:46.435Z",
"description": [
"Rack A01",
"The original one"
],
"domain": "DEMO",
"id": "6364e7baf1347668dd4b080a",
"lastUpdated": "2022-11-04T11:01:03.962Z",
"name": "A01",
"parentId": "6364e3e3f1347668dd4b0808"
},
"type": "modify"
}
It should either:
- refuse the attribute as it's wrongly formatted
- use the attribute name with the dot inside it
- refine the name to remove the dot
hchybz commented
check in TOK_WORD if "." is really not needed
if NOT : remove "." from TOK_WORD
if YES : change go assignNode code