Unable to create new interface for a device when selecting #7846

Closed
opened 2025-12-29 20:28:57 +01:00 by adam · 2 comments
Owner

Originally created by @abhi1693 on GitHub (Apr 1, 2023).

Originally assigned to: @jeremystretch on GitHub.

NetBox version

v3.5-beta1

Python version

3.10

Steps to Reproduce

  1. Using the demo data in the local env, go to a device
  2. Click on Add interface and use the following info
  • name: vlan190
  • type: virtual
  • speed: 1000000
  • description: MGMT
  • mtu: 8156
  • 802 mode: access
  1. Click save

Note: The issue can be seen as soon as the mode is selected

Expected Behavior

The interface is added

Observed Behavior

device and type field show up as empty and request the user to select a value

Originally created by @abhi1693 on GitHub (Apr 1, 2023). Originally assigned to: @jeremystretch on GitHub. ### NetBox version v3.5-beta1 ### Python version 3.10 ### Steps to Reproduce 1. Using the demo data in the local env, go to a device 2. Click on Add interface and use the following info - name: vlan190 - type: virtual - speed: 1000000 - description: MGMT - mtu: 8156 - 802 mode: access 3. Click save **Note: The issue can be seen as soon as the mode is selected** ### Expected Behavior The interface is added ### Observed Behavior `device` and `type` field show up as empty and request the user to select a value
adam added the type: bugstatus: acceptedbeta labels 2025-12-29 20:28:57 +01:00
adam closed this issue 2025-12-29 20:28:57 +01:00
Author
Owner

@abhi1693 commented on GitHub (Apr 1, 2023):

The bad code causing this issue is at https://github.com/netbox-community/netbox/blob/feature/netbox/dcim/forms/model_forms.py#L1139

@abhi1693 commented on GitHub (Apr 1, 2023): The bad code causing this issue is at https://github.com/netbox-community/netbox/blob/feature/netbox/dcim/forms/model_forms.py#L1139
Author
Owner

@abhi1693 commented on GitHub (Apr 1, 2023):

It should be fixed by using 'hx-include': '#form_fields input, #form_fields select', for mode to capture select values as well

@abhi1693 commented on GitHub (Apr 1, 2023): It should be fixed by using `'hx-include': '#form_fields input, #form_fields select',` for mode to capture select values as well
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#7846