volkszaehler.org
volkszaehler.org copied to clipboard
Emptying input in virtual sensor keeps it in web frontend
When creating a virtual sensor channel with 2 inputs, and then emptying the second input value, the value is still visible in the web frontend - until the frontend is reloaded.
Steps to reproduce:
- Create new channel of type "Verbrauchssensor (virt.)"
- Fill values for "Eingang 1" and "Eingang 2" and save
- Edit the channel and remove the value for "Eingang 2" and save
- A PATCH request is sent, removing the value. The object data returned by the server do not contain "in2" anymore.
- The edit window closes automatically
- Click the channel's info button. "Eingang 2" is still shown and still has the value that was just deleted. <-- this is a bug
- Click the edit button and remove the value again in the "Eingang 2" field. Save.
- The PATCH request fails with status code 400:
Object { message: "Entity has no property: 'in2'", type: "Exception", code: 0, … }
<-- this is a bug - Reload the tab in the browser
- Open the channel's info popup: The "Eingang 2" value is gone.
Somehow the web interface keeps the in2 field internally.