Skip to content
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

Disabling 802.1Q mode on interfaces don't clear untagged vlan assignment #5360

Closed
miaow2 opened this issue Nov 19, 2020 · 1 comment
Closed
Assignees
Labels
status: accepted This issue has been accepted for implementation type: bug A confirmed report of unexpected behavior in the application

Comments

@miaow2
Copy link
Contributor

miaow2 commented Nov 19, 2020

Environment

  • Python version: 3.6.8
  • NetBox version: 2.9.4

Steps to Reproduce

  1. set on interface (on device or vm) 802.1Q Mode (any mode) and Untagged VLAN
  2. set 802.1Q Mode to None, fields with vlans disapear
  3. set any 802.1Q Mode again, field Untagged VLAN will be filled with VLAN from step 1

If you save after step 2, 802.1Q Mode will change, but Untagged VLAN stays on interface.

Expected Behavior

Untagged VLAN field should be empty

Observed Behavior

Untagged VLAN field does not clear, with Tagged VLANs field all works fine.

On my enviroment I fix this in file project-static/js/forms.js line 351 by sending empty string to val() function.

$('select#id_untagged_vlan').val('');

I don't know is this a good solution, so I open this issue

@jeremystretch jeremystretch added status: accepted This issue has been accepted for implementation type: bug A confirmed report of unexpected behavior in the application labels Nov 20, 2020
@jeremystretch
Copy link
Member

This line seems to be the problem. Since we moved to slugs for choice fields, the mode field now stores an empty string rather than null.

@jeremystretch jeremystretch self-assigned this Nov 20, 2020
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 19, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status: accepted This issue has been accepted for implementation type: bug A confirmed report of unexpected behavior in the application
Projects
None yet
Development

No branches or pull requests

2 participants