Skip to content

cant unset a device interface vlan mode without an error #19229

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
ITJamie opened this issue Apr 17, 2025 · 1 comment · May be fixed by #19301
Open

cant unset a device interface vlan mode without an error #19229

ITJamie opened this issue Apr 17, 2025 · 1 comment · May be fixed by #19301
Assignees
Labels
severity: low Does not significantly disrupt application functionality, or a workaround is available status: accepted This issue has been accepted for implementation type: bug A confirmed report of unexpected behavior in the application

Comments

@ITJamie
Copy link
Contributor

ITJamie commented Apr 17, 2025

Deployment Type

Self-hosted

NetBox Version

v4.2.7

Python Version

3.11

Steps to Reproduce

  1. create a device
  2. create an interface on a device
  3. set the mode on the interface to tagged
  4. set the untagged vlan on that interface.
  5. save
  6. edit the interface
  7. unset vlan mode ( press the x button in that form field, the untagged vlan field will dissapear )
  8. press save - get error

Expected Behavior

vlan mode gets unset + untagged / tags vlans get deleted

Observed Behavior

an error was raised

<class 'ValueError'>

'InterfaceForm' has no field named 'untagged_vlan'.

Python version: 3.12.3
NetBox version: 4.2.7-Docker-3.2.0
@ITJamie ITJamie added status: needs triage This issue is awaiting triage by a maintainer type: bug A confirmed report of unexpected behavior in the application labels Apr 17, 2025
@arthanson
Copy link
Collaborator

Traceback (most recent call last):
  File "/Users/ahanson/dev/work/netbox/venv/lib/python3.12/site-packages/django/core/handlers/exception.py", line 55, in inner
    response = get_response(request)
               ^^^^^^^^^^^^^^^^^^^^^
  File "/Users/ahanson/dev/work/netbox/venv/lib/python3.12/site-packages/django/core/handlers/base.py", line 197, in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/ahanson/dev/work/netbox/venv/lib/python3.12/site-packages/django/views/generic/base.py", line 104, in view
    return self.dispatch(request, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/ahanson/dev/work/netbox/netbox/netbox/views/generic/object_views.py", line 182, in dispatch
    return super().dispatch(request, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/ahanson/dev/work/netbox/netbox/netbox/views/generic/base.py", line 26, in dispatch
    return super().dispatch(request, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/ahanson/dev/work/netbox/netbox/utilities/views.py", line 125, in dispatch
    return super().dispatch(request, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/ahanson/dev/work/netbox/netbox/utilities/views.py", line 39, in dispatch
    return super().dispatch(request, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/ahanson/dev/work/netbox/venv/lib/python3.12/site-packages/django/views/generic/base.py", line 143, in dispatch
    return handler(request, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/ahanson/dev/work/netbox/netbox/netbox/views/generic/object_views.py", line 278, in post
    if form.is_valid():
       ^^^^^^^^^^^^^^^
  File "/Users/ahanson/dev/work/netbox/venv/lib/python3.12/site-packages/django/forms/forms.py", line 197, in is_valid
    return self.is_bound and not self.errors
                                 ^^^^^^^^^^^
  File "/Users/ahanson/dev/work/netbox/venv/lib/python3.12/site-packages/django/forms/forms.py", line 192, in errors
    self.full_clean()
  File "/Users/ahanson/dev/work/netbox/venv/lib/python3.12/site-packages/django/forms/forms.py", line 327, in full_clean
    self._post_clean()
  File "/Users/ahanson/dev/work/netbox/netbox/netbox/forms/base.py", line 78, in _post_clean
    return super()._post_clean()
           ^^^^^^^^^^^^^^^^^^^^^
  File "/Users/ahanson/dev/work/netbox/venv/lib/python3.12/site-packages/django/forms/models.py", line 500, in _post_clean
    self._update_errors(e)
  File "/Users/ahanson/dev/work/netbox/venv/lib/python3.12/site-packages/django/forms/models.py", line 472, in _update_errors
    self.add_error(None, errors)
  File "/Users/ahanson/dev/work/netbox/venv/lib/python3.12/site-packages/django/forms/forms.py", line 292, in add_error
    raise ValueError(
ValueError: 'InterfaceForm' has no field named 'untagged_vlan'.

@arthanson arthanson added status: needs owner This issue is tentatively accepted pending a volunteer committed to its implementation severity: low Does not significantly disrupt application functionality, or a workaround is available and removed status: needs triage This issue is awaiting triage by a maintainer labels Apr 18, 2025
@jeremystretch jeremystretch added status: accepted This issue has been accepted for implementation and removed status: needs owner This issue is tentatively accepted pending a volunteer committed to its implementation labels Apr 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
severity: low Does not significantly disrupt application functionality, or a workaround is available status: accepted This issue has been accepted for implementation type: bug A confirmed report of unexpected behavior in the application
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants