Fixes #13721: Filter VLAN choices by selected site (if any) when creating a prefix

This commit is contained in:
Jeremy Stretch
2023-09-11 13:52:19 -04:00
parent 5b41e88a41
commit a893b88976
2 changed files with 7 additions and 0 deletions

View File

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