From 3b1eb6118f0b18be5ce34e2e613f6158f431e8ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mario=20H=C3=BCttel?= Date: Tue, 4 Jan 2022 20:02:13 +0100 Subject: [PATCH] Revert "Add filtering to component API" This reverts commit 76c79403f223056770af4e36d279c9076da67bc8. --- shimatta_kenkyusho/api/views.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/shimatta_kenkyusho/api/views.py b/shimatta_kenkyusho/api/views.py index 3ec6412..fce8f85 100644 --- a/shimatta_kenkyusho/api/views.py +++ b/shimatta_kenkyusho/api/views.py @@ -57,9 +57,8 @@ class PartsComponentTypeViewSet(viewsets.ModelViewSet): queryset = parts_models.ComponentType.objects.all() serializer_class = ComponentTypeSerializer permission_classes = [permissions.DjangoModelPermissions] - filter_backends = [filters.SearchFilter, django_filters.rest_framework.DjangoFilterBackend] + filter_backends = [filters.SearchFilter] search_fields = ['class_name'] - filterset_fields = ['id', 'name'] class PartsComponentParameterTypeViewSet(viewsets.ModelViewSet): queryset = parts_models.ComponentParameterType.objects.all()