diff --git a/market/viewsets.py b/market/viewsets.py index aceb09d..740465c 100644 --- a/market/viewsets.py +++ b/market/viewsets.py @@ -16,18 +16,9 @@ from market.serializers import ( class BrandViewset(ActionBasedMixin, ModelViewSet): queryset = Brand.objects.all() serializer_class = BrandSerializer - serializer_class_map = { - "products": ProductSerializer, - } permission_classes = [IsAdminUserOrReadOnly] pagination_class = None - @action(detail=True, methods=["GET"]) - def product(self, request, pk): - queryset = self.get_object().products.all() - serializer = self.get_serializer(queryset, many=True) - return Response(serializer.data) - class ProductViewset(ActionBasedMixin, ModelViewSet): queryset = (