Skip to content

Fixes #19465: Fix ability to clear assigned prefix scope in UI #19479

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

Merged
merged 1 commit into from
May 13, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions netbox/dcim/forms/mixins.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,10 @@ def _set_scoped_values(self):
if self.instance and scope_type_id != self.instance.scope_type_id:
self.initial['scope'] = None

else:
# Clear the initial scope value if scope_type is not set
self.initial['scope'] = None


class ScopedBulkEditForm(forms.Form):
scope_type = ContentTypeChoiceField(
Expand Down