1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

Replace 'nullable' attribute with null_option

This commit is contained in:
Jeremy Stretch
2020-08-12 10:05:12 -04:00
parent 8a8b4e728a
commit b917403c93
5 changed files with 16 additions and 40 deletions

View File

@@ -197,12 +197,10 @@ class ClusterAddDevicesForm(BootstrapMixin, forms.Form):
region = DynamicModelChoiceField(
queryset=Region.objects.all(),
required=False,
null_option='None',
widget=APISelect(
filter_for={
"site": "region_id",
},
attrs={
'nullable': 'true',
}
)
)
@@ -219,12 +217,10 @@ class ClusterAddDevicesForm(BootstrapMixin, forms.Form):
rack = DynamicModelChoiceField(
queryset=Rack.objects.all(),
required=False,
null_option='None',
widget=APISelect(
filter_for={
"devices": "rack_id"
},
attrs={
'nullable': 'true',
}
)
)
@@ -278,12 +274,10 @@ class VirtualMachineForm(BootstrapMixin, TenancyForm, CustomFieldModelForm):
cluster_group = DynamicModelChoiceField(
queryset=ClusterGroup.objects.all(),
required=False,
null_option='None',
widget=APISelect(
filter_for={
"cluster": "group_id",
},
attrs={
'nullable': 'true',
}
)
)