fix: Prevent paginate for product list
This commit is contained in:
parent
b81b18ed12
commit
678eae2c5f
@ -33,6 +33,11 @@ class ProductViewset(ActionBasedMixin, ModelViewSet):
|
||||
}
|
||||
permission_classes = [IsAdminUserOrReadOnly]
|
||||
|
||||
def list(self, request, *args, **kwargs):
|
||||
queryset = self.filter_queryset(self.get_queryset())
|
||||
serializer = self.get_serializer(queryset, many=True)
|
||||
return Response(serializer.data)
|
||||
|
||||
@action(detail=True, methods=["GET"])
|
||||
def posts(self, request, pk):
|
||||
product = self.get_object()
|
||||
|
Loading…
Reference in New Issue
Block a user