Closed asulonn closed 1 year ago
Will be changed in v2.3.4: to let tags = { location: (collection?.location ? collection.location : undefined) };
Is it possible to test this change at your site because this error condition is not produced at my site. txs
What you suggested triggered the following error: TypeError: Cannot read properties of undefined (reading 'replace')
The quotes were missing. The code below did work:
let tags = { location: (collection?.location ? collection.location : "Undefined") };
When Qbus entities have no location set, it triggers an error when they are reported to InfluxDB:
[error] [Stackhero-InfluxDB-v2-write:0c01db4h7bn9ae3d] Error: 400 on http://influxdbv2:8086/api/v2/write?org=Thuis&bucket=qbus&precision=ms: {"code":"invalid","message":"unable to parse 'q_Reserve_LF7,location= value=0 2639645823529': missing tag value"}
I solved the issue by changing the code line in subflow "Qbus InfluxDB" => Function node "Create influx data" => line 15 From:
let tags = { location: collection.location };
To:let tags = { location: (collection.location !== "" ? collection.location : "Undefined") };