ioBroker.influxdb
ioBroker.influxdb copied to clipboard
Possible data loss when updating values via GUI
Describe the bug
If you want to edit data via the GUI and accidentally enter a text instead of "Number", the record will be deleted but not recreated.
To Reproduce
Steps to reproduce the behavior:
- Select a Datapoint with Datatype "Number"
- Go to 'History Data'
- Select a line
- Click on 'Update'-Button
- Enter a text like "abcd" or leave empty
- Click "Update"
Expected behavior
A suitable error message that the data type is not correct or no action.
Versions:
- Adapter version: 3.2.0
- JS-Controller version: 4.0.24
- Node version: 18.16.0
- Operating system: Docker image (Buanet)
Additional context
You can see in the source code that the variable "state.val" remains empty. This causes the function "pushValueIntoDB" to be aborted. The callback is not evaluated, so the failed update is not noticed. Since the Delete function was called before the call of "pushValueIntoDB", data is lost.
Since I have just implemented the Update/Delete function for InfluxDB 2.x, a comprehensive solution for 1.x and 2.x would be useful.
Edit: Changes to the wording