volkszaehler.org icon indicating copy to clipboard operation
volkszaehler.org copied to clipboard

Emptying input in virtual sensor keeps it in web frontend

Open cweiske opened this issue 2 years ago • 0 comments

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:

  1. Create new channel of type "Verbrauchssensor (virt.)"
  2. Fill values for "Eingang 1" and "Eingang 2" and save
  3. Edit the channel and remove the value for "Eingang 2" and save
  4. A PATCH request is sent, removing the value. The object data returned by the server do not contain "in2" anymore.
  5. The edit window closes automatically
  6. Click the channel's info button. "Eingang 2" is still shown and still has the value that was just deleted. <-- this is a bug
  7. Click the edit button and remove the value again in the "Eingang 2" field. Save.
  8. The PATCH request fails with status code 400: Object { message: "Entity has no property: 'in2'", type: "Exception", code: 0, … } <-- this is a bug
  9. Reload the tab in the browser
  10. Open the channel's info popup: The "Eingang 2" value is gone.

Somehow the web interface keeps the in2 field internally.

cweiske avatar Mar 30 '22 20:03 cweiske