mirror of
https://github.com/netbox-community/netbox.git
synced 2025-08-09 09:08:15 -06:00
Fixes #15717: Allow VM with Site to Cluster without Site
This commit is contained in:
parent
3311a97be0
commit
6309366164
@ -465,7 +465,10 @@ class DeviceForm(TenancyForm, NetBoxModelForm):
|
|||||||
label=_('Cluster'),
|
label=_('Cluster'),
|
||||||
queryset=Cluster.objects.all(),
|
queryset=Cluster.objects.all(),
|
||||||
required=False,
|
required=False,
|
||||||
selector=True
|
selector=True,
|
||||||
|
query_params={
|
||||||
|
'site_id': ['$site', 'null']
|
||||||
|
},
|
||||||
)
|
)
|
||||||
comments = CommentField()
|
comments = CommentField()
|
||||||
local_context_data = JSONField(
|
local_context_data = JSONField(
|
||||||
|
@ -177,6 +177,9 @@ class VirtualMachineForm(TenancyForm, NetBoxModelForm):
|
|||||||
queryset=Cluster.objects.all(),
|
queryset=Cluster.objects.all(),
|
||||||
required=False,
|
required=False,
|
||||||
selector=True,
|
selector=True,
|
||||||
|
query_params={
|
||||||
|
'site_id': ['$site', 'null']
|
||||||
|
},
|
||||||
)
|
)
|
||||||
device = DynamicModelChoiceField(
|
device = DynamicModelChoiceField(
|
||||||
label=_('Device'),
|
label=_('Device'),
|
||||||
|
Loading…
Reference in New Issue
Block a user