diff --git a/shimatta_kenkyusho/api/views.py b/shimatta_kenkyusho/api/views.py index 9c14f32..fce8f85 100644 --- a/shimatta_kenkyusho/api/views.py +++ b/shimatta_kenkyusho/api/views.py @@ -52,15 +52,13 @@ class PartsComponentViewSet(viewsets.ModelViewSet): permission_classes = [permissions.DjangoModelPermissions] filter_backends = [filters.SearchFilter] search_fields = ['id', 'name', 'package__name', 'manufacturer__name'] - 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()