Skip to content

Commit 6f94198

Browse files
committed
#7123: Remove "Global" placeholder for null VRF field
1 parent 707e51d commit 6f94198

File tree

2 files changed

+2
-18
lines changed

2 files changed

+2
-18
lines changed

docs/release-notes/version-3.0.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
* [#7107](https://github.com/netbox-community/netbox/issues/7107) - Fix missing search button and search results in IP Address assignment "Assign IP" tab
2626
* [#7109](https://github.com/netbox-community/netbox/issues/7109) - Ensure human readability of exceptions raised during REST API requests
2727
* [#7113](https://github.com/netbox-community/netbox/issues/7113) - Fix IPRange bulk options within Prefix view
28+
* [#7123](https://github.com/netbox-community/netbox/issues/7123) - Remove "Global" placeholder for null VRF field
2829

2930
---
3031

netbox/ipam/forms.py

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -491,11 +491,6 @@ class Meta:
491491
'status': StaticSelect(),
492492
}
493493

494-
def __init__(self, *args, **kwargs):
495-
super().__init__(*args, **kwargs)
496-
497-
self.fields['vrf'].empty_label = 'Global'
498-
499494

500495
class PrefixCSVForm(CustomFieldModelCSVForm):
501496
vrf = CSVModelChoiceField(
@@ -760,11 +755,6 @@ class Meta:
760755
'status': StaticSelect(),
761756
}
762757

763-
def __init__(self, *args, **kwargs):
764-
super().__init__(*args, **kwargs)
765-
766-
self.fields['vrf'].empty_label = 'Global'
767-
768758

769759
class IPRangeCSVForm(CustomFieldModelCSVForm):
770760
vrf = CSVModelChoiceField(
@@ -1026,8 +1016,6 @@ def __init__(self, *args, **kwargs):
10261016

10271017
super().__init__(*args, **kwargs)
10281018

1029-
self.fields['vrf'].empty_label = 'Global'
1030-
10311019
# Initialize primary_for_parent if IP address is already assigned
10321020
if self.instance.pk and self.instance.assigned_object:
10331021
parent = self.instance.assigned_object.parent_object
@@ -1102,10 +1090,6 @@ class Meta:
11021090
'role': StaticSelect(),
11031091
}
11041092

1105-
def __init__(self, *args, **kwargs):
1106-
super().__init__(*args, **kwargs)
1107-
self.fields['vrf'].empty_label = 'Global'
1108-
11091093

11101094
class IPAddressCSVForm(CustomFieldModelCSVForm):
11111095
vrf = CSVModelChoiceField(
@@ -1256,8 +1240,7 @@ class IPAddressAssignForm(BootstrapMixin, forms.Form):
12561240
vrf_id = DynamicModelChoiceField(
12571241
queryset=VRF.objects.all(),
12581242
required=False,
1259-
label='VRF',
1260-
empty_label='Global'
1243+
label='VRF'
12611244
)
12621245
q = forms.CharField(
12631246
required=False,

0 commit comments

Comments
 (0)