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

Fixes: #5315 - Make "null_option" on DynamicModelChoiceField also null the value on the model. #5704

Merged
merged 5 commits into from
Feb 12, 2021

Conversation

DanSheps
Copy link
Member

Fixes: #5315

Alter the DynamicModelChoiceField to remove any value that is a string of 'null' if the 'null_option' and then call the parent clean() method.

Copy link
Member

@jeremystretch jeremystretch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Other than my one note I think this is fine. It feels a bit hacky, but it's certainly preferable to overhauling the choice widgets at the moment.

netbox/utilities/forms/fields.py Outdated Show resolved Hide resolved
@DanSheps DanSheps merged commit 3d3748d into develop Feb 12, 2021
@jeremystretch jeremystretch deleted the 5315-site_unassignment_vlan branch March 5, 2021 14:10
glennmatthews added a commit to nautobot/nautobot that referenced this pull request Jun 16, 2021
glennmatthews added a commit to nautobot/nautobot that referenced this pull request Jun 16, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 26, 2022
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.

Cannot unassign a site from a vlan
2 participants