mirror of
https://github.com/netbox-community/netbox.git
synced 2025-12-20 12:22:23 -06:00
Fix graph:type choices under /api/extras/_choices/
This commit is contained in:
@@ -20,6 +20,7 @@ from utilities.api import (
|
||||
ChoiceField, ContentTypeField, get_serializer_for_model, SerializerNotFound, SerializedPKRelatedField,
|
||||
ValidatedModelSerializer,
|
||||
)
|
||||
from utilities.utils import model_names_to_filter_dict
|
||||
from .nested_serializers import *
|
||||
|
||||
|
||||
@@ -29,7 +30,7 @@ from .nested_serializers import *
|
||||
|
||||
class GraphSerializer(ValidatedModelSerializer):
|
||||
type = ContentTypeField(
|
||||
queryset=ContentType.objects.all()
|
||||
queryset=ContentType.objects.filter(**model_names_to_filter_dict(GRAPH_MODELS)),
|
||||
)
|
||||
|
||||
class Meta:
|
||||
|
||||
Reference in New Issue
Block a user