Revert "Add filtering to component API"
This reverts commit c6fae17154
.
This commit is contained in:
parent
c6fae17154
commit
1e302e4595
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user