mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-24 17:38:37 -06:00
Corrected models for cluster and cluster group fields
This commit is contained in:
parent
8849f4b0a5
commit
bceaa4a9a4
@ -13,6 +13,7 @@ from utilities.forms import (
|
|||||||
CommentField, ContentTypeSelect, DatePicker, DateTimePicker, FilterChoiceField, LaxURLField, JSONField,
|
CommentField, ContentTypeSelect, DatePicker, DateTimePicker, FilterChoiceField, LaxURLField, JSONField,
|
||||||
SlugField, StaticSelect2, BOOLEAN_WITH_BLANK_CHOICES,
|
SlugField, StaticSelect2, BOOLEAN_WITH_BLANK_CHOICES,
|
||||||
)
|
)
|
||||||
|
from virtualization.models import Cluster, ClusterGroup
|
||||||
from .choices import *
|
from .choices import *
|
||||||
from .models import ConfigContext, CustomField, CustomFieldValue, ImageAttachment, ObjectChange, Tag
|
from .models import ConfigContext, CustomField, CustomFieldValue, ImageAttachment, ObjectChange, Tag
|
||||||
|
|
||||||
@ -347,7 +348,7 @@ class ConfigContextFilterForm(BootstrapMixin, forms.Form):
|
|||||||
)
|
)
|
||||||
)
|
)
|
||||||
cluster_group = FilterChoiceField(
|
cluster_group = FilterChoiceField(
|
||||||
queryset=TenantGroup.objects.all(),
|
queryset=ClusterGroup.objects.all(),
|
||||||
to_field_name='slug',
|
to_field_name='slug',
|
||||||
widget=APISelectMultiple(
|
widget=APISelectMultiple(
|
||||||
api_url="/api/virtualization/cluster-groups/",
|
api_url="/api/virtualization/cluster-groups/",
|
||||||
@ -355,7 +356,7 @@ class ConfigContextFilterForm(BootstrapMixin, forms.Form):
|
|||||||
)
|
)
|
||||||
)
|
)
|
||||||
cluster_id = FilterChoiceField(
|
cluster_id = FilterChoiceField(
|
||||||
queryset=Tenant.objects.all(),
|
queryset=Cluster.objects.all(),
|
||||||
label='Cluster',
|
label='Cluster',
|
||||||
widget=APISelectMultiple(
|
widget=APISelectMultiple(
|
||||||
api_url="/api/virtualization/clusters/",
|
api_url="/api/virtualization/clusters/",
|
||||||
|
Loading…
Reference in New Issue
Block a user