Skip to content

Conversation

@renatoalmeidaoliveira
Copy link
Contributor

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

  • When the user changes the Interface mode, the untagged_vlan and tagged_vlans fields are unset and excluded from the InterfaceForm data.
  • Since the form instance is derived from a copy of the concrete object, the untagged_vlan and tagged_vlans remain untouched even when the mode field is modified, leading to a validation error when updating the model.
  • The fix ensures that when the form instance's mode field differs from cleaned_data["mode"], these fields are properly removed from the instance when unset, preventing validation errors.

@renatoalmeidaoliveira renatoalmeidaoliveira requested review from a team and bctiemann and removed request for a team April 24, 2025 11:53
@bctiemann bctiemann merged commit f652dc7 into netbox-community:main Apr 28, 2025
3 checks passed
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 29, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

cant unset a device interface vlan mode without an error

2 participants