mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-22 12:06:53 -06:00
Ditch hard-coded filtering of ContentTypes API endpoint
This commit is contained in:
parent
3df3706f27
commit
d61d62088f
@ -319,8 +319,6 @@ class ContentTypeViewSet(ReadOnlyModelViewSet):
|
|||||||
"""
|
"""
|
||||||
Read-only list of ContentTypes. Limit results to ContentTypes pertinent to NetBox objects.
|
Read-only list of ContentTypes. Limit results to ContentTypes pertinent to NetBox objects.
|
||||||
"""
|
"""
|
||||||
queryset = ContentType.objects.order_by('app_label', 'model').filter(app_label__in=(
|
queryset = ContentType.objects.order_by('app_label', 'model')
|
||||||
'circuits', 'dcim', 'extras', 'ipam', 'secrets', 'tenancy', 'users', 'virtualization'
|
|
||||||
))
|
|
||||||
serializer_class = serializers.ContentTypeSerializer
|
serializer_class = serializers.ContentTypeSerializer
|
||||||
filterset_class = filters.ContentTypeFilterSet
|
filterset_class = filters.ContentTypeFilterSet
|
||||||
|
Loading…
Reference in New Issue
Block a user