Skip to content

Fixes: #19229 Validade interface mode changes #19301

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
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

renatoalmeidaoliveira
Copy link
Collaborator

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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
1 participant