Fixes #15717 - Unable to assign a VM in Site to Cluster without Site (#15763)

* Fixes #15717: Allow VM with Site to Cluster without Site

* Fixes #15717: Allow VM with Site to Cluster without Site

* Fixes #15717: Allow VM with Site to Cluster without Site

* Fixes #15717: Allow VM with Site to Cluster without Site

* Fixes #15717: Allow VM with Site to Cluster without Site
This commit is contained in:
Ryan Gillespie
2024-06-20 08:59:17 -06:00
committed by GitHub
parent 32e219c70a
commit 582ede8ed3
5 changed files with 41 additions and 4 deletions

View File

@@ -465,7 +465,10 @@ class DeviceForm(TenancyForm, NetBoxModelForm):
label=_('Cluster'),
queryset=Cluster.objects.all(),
required=False,
selector=True
selector=True,
query_params={
'site_id': ['$site', 'null']
},
)
comments = CommentField()
local_context_data = JSONField(