Revert "Add filtering to component API"

This reverts commit c6fae17154.
This commit is contained in:
Mario Hüttel 2022-01-04 20:05:11 +01:00
parent c6fae17154
commit 1e302e4595

View File

@ -53,14 +53,12 @@ class PartsComponentViewSet(viewsets.ModelViewSet):
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()