mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-14 09:51:22 -06:00
Fixes #4756: Filter parent group by site when creating rack groups
This commit is contained in:
parent
9fc4a4f24a
commit
2e5058c4c9
@ -16,6 +16,7 @@
|
|||||||
* [#4736](https://github.com/netbox-community/netbox/issues/4736) - Add cable trace endpoints for pass-through ports
|
* [#4736](https://github.com/netbox-community/netbox/issues/4736) - Add cable trace endpoints for pass-through ports
|
||||||
* [#4737](https://github.com/netbox-community/netbox/issues/4737) - Fix display of role labels in virtual machines table
|
* [#4737](https://github.com/netbox-community/netbox/issues/4737) - Fix display of role labels in virtual machines table
|
||||||
* [#4743](https://github.com/netbox-community/netbox/issues/4743) - Allow users to create "next available" IPs without needing permission to create prefixes
|
* [#4743](https://github.com/netbox-community/netbox/issues/4743) - Allow users to create "next available" IPs without needing permission to create prefixes
|
||||||
|
* [#4756](https://github.com/netbox-community/netbox/issues/4756) - Filter parent group by site when creating rack groups
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
@ -363,7 +363,14 @@ class SiteFilterForm(BootstrapMixin, TenancyFilterForm, CustomFieldFilterForm):
|
|||||||
|
|
||||||
class RackGroupForm(BootstrapMixin, forms.ModelForm):
|
class RackGroupForm(BootstrapMixin, forms.ModelForm):
|
||||||
site = DynamicModelChoiceField(
|
site = DynamicModelChoiceField(
|
||||||
queryset=Site.objects.all()
|
queryset=Site.objects.all(),
|
||||||
|
to_field_name='slug',
|
||||||
|
widget=APISelect(
|
||||||
|
value_field='slug',
|
||||||
|
filter_for={
|
||||||
|
'parent': 'site',
|
||||||
|
}
|
||||||
|
)
|
||||||
)
|
)
|
||||||
parent = DynamicModelChoiceField(
|
parent = DynamicModelChoiceField(
|
||||||
queryset=RackGroup.objects.all(),
|
queryset=RackGroup.objects.all(),
|
||||||
|
Loading…
Reference in New Issue
Block a user