Selaa lähdekoodia

Change IPAddressForm.nat_vrf to DynamicModelChoiceField

Jeremy Stretch 6 vuotta sitten
vanhempi
commit
450615e0bb
1 muutettua tiedostoa jossa 1 lisäystä ja 2 poistoa
  1. 1 2
      netbox/ipam/forms.py

+ 1 - 2
netbox/ipam/forms.py

@@ -606,12 +606,11 @@ class IPAddressForm(BootstrapMixin, TenancyForm, ReturnURLForm, CustomFieldModel
             }
             }
         )
         )
     )
     )
-    nat_vrf = forms.ModelChoiceField(
+    nat_vrf = DynamicModelChoiceField(
         queryset=VRF.objects.all(),
         queryset=VRF.objects.all(),
         required=False,
         required=False,
         label='VRF',
         label='VRF',
         widget=APISelect(
         widget=APISelect(
-            api_url="/api/ipam/vrfs/",
             filter_for={
             filter_for={
                 'nat_inside': 'vrf_id'
                 'nat_inside': 'vrf_id'
             }
             }