Skip to content

Device Update Form Refactor

Tim Metzner requested to merge deviceupdate_refactor into main

Another "too complex" function refactored.

Also fixed some bugs / ux problems:

  • If you change the device type and change it back before submitting the form, all the attribute fields will be empty on the form. The user might not notice this, make a different change, submit the form, and accidentally delete all attributes. This has been fixed.
  • When changing the device type, the old attributes are supposed to be deleted. This did not work previously.
  • Changing uses was broken, even if it still yielded correct results. The code was supposed to check which uses need to be deleted and which ones need to be added, and leave uses that didn't change untouched. However, due to a bug, it instead deleted everything and then added everything.
Edited by Tim Metzner

Merge request reports