Closes #12622: Fix assigning VLAN without site to Prefix (#12784)

* Issue #12622: Fix creating Prefix using VLAN without site

* Issue #12622: Fix importing Prefix using VLAN without site

This commit also adds tests to verify the import changes implemented
in this commit.

* Issue #12622: Cleanup code to filter allowed VLANs on a prefix import

* Closes #12622: Switch to VLAN selector dialog when creating Prefix
This commit is contained in:
Dillon Henschen
2023-06-14 13:49:00 -04:00
committed by GitHub
parent e6ea95e60d
commit bbb98e5f7c
3 changed files with 85 additions and 12 deletions

View File

@@ -211,10 +211,8 @@ class PrefixForm(TenancyForm, NetBoxModelForm):
vlan = DynamicModelChoiceField(
queryset=VLAN.objects.all(),
required=False,
selector=True,
label=_('VLAN'),
query_params={
'site_id': '$site',
}
)
role = DynamicModelChoiceField(
queryset=Role.objects.all(),