Skip to content

Commit b5125e5

Browse files
committed
Fixes #13721: Filter VLAN choices by selected site (if any) when creating a prefix
1 parent a8a36c0 commit b5125e5

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

docs/release-notes/version-3.6.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
## v3.6.2 (FUTURE)
44

5+
### Bug Fixes
6+
7+
* [#13721](https://github.com/netbox-community/netbox/issues/13721) - Filter VLAN choices by selected site (if any) when creating a prefix
8+
59
---
610

711
## v3.6.1 (2023-09-06)

netbox/ipam/forms/model_forms.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,9 @@ class PrefixForm(TenancyForm, NetBoxModelForm):
215215
queryset=VLAN.objects.all(),
216216
required=False,
217217
selector=True,
218+
query_params={
219+
'site_id': '$site',
220+
},
218221
label=_('VLAN'),
219222
)
220223
role = DynamicModelChoiceField(

0 commit comments

Comments
 (0)