-
-
Notifications
You must be signed in to change notification settings - Fork 238
Closed
Labels
Description
Describe the bug
There are two bugs in the configuration default editor for a Device in the admin.
- For select fields, with predefined values in the corresponding JSON schema, when a value is saved other than the default, the field will be empty after saving. The saved value is though present in the advanced mode editor. This happens only, in combination of the lib
select2. See also corresponding GIF below. - The dropdown for
Configuration MenuandObject Propertiesare not shown anymore, if a configuration section is saved, which has in its JSON schema definition a property with type array and should have unique items (such as Mwan3) . See also corresponding GIF below.
Steps To Reproduce
Steps to reproduce the behavior for the 1. Issue:
- Go to the change view of an existing Device.
- Select the Configuration tab.
- Create a new Configuration for the section
General. - In the field timezone, set a value other than the default.
- Click
Save and continue editing. - Scroll down to the configuration section
General. The previous selected and saved value is not shown.
Steps to reproduce the behavior for the 2. Issue:
- Go to the change view of an existing Device.
- Select the Configuration tab.
- Create a new Configuration for the section
Mwan3. (I patched this into netjsonconfig from WIP: Openwrt: Add support for mwan3 netjsonconfig#232 because it has a property in its schema definition with type array and allows only unique items) - Click
Save and continue editing. - Scroll down to the configuration section and click
Configuration Menu. The menu dropdown will not show up, but all configuration fields will be disabled.
Expected behavior
Expected behavior for the 1. Issue:
The saved value, should always be displayed.
Expected behavior for the 2. Issue:
The dropdown menu of the Configuration Menu and the Object Properties should be always displayed.
Screenshots
GIF for showing the 1. Issue:

System Information:
- OS: Debian 12
- Python Version: 3.9.2
- Django Version: 4.2.15
- Browser and Browser Version (if applicable): Firefox and Chromium
nemesifier
