Skip to content

Commit 59dce87

Browse files
Fixes #19465: Fix ability to clear assigned prefix scope in UI (#19479)
1 parent f6a8577 commit 59dce87

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

netbox/dcim/forms/mixins.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,10 @@ def _set_scoped_values(self):
6666
if self.instance and scope_type_id != self.instance.scope_type_id:
6767
self.initial['scope'] = None
6868

69+
else:
70+
# Clear the initial scope value if scope_type is not set
71+
self.initial['scope'] = None
72+
6973

7074
class ScopedBulkEditForm(forms.Form):
7175
scope_type = ContentTypeChoiceField(

0 commit comments

Comments
 (0)