go back
This commit is contained in:
1 parent
35835fc64f
commit
21c4f11ebc
1 file changed
+1
-2
+1
-2
@@ -13,9 +13,8 @@ class ProductViewSet(mixins.ListModelMixin,
|
|||||||
GenericViewSet):
|
GenericViewSet):
|
||||||
serializer_class = ProductSerializer
|
serializer_class = ProductSerializer
|
||||||
queryset = Product.objects.all()
|
queryset = Product.objects.all()
|
||||||
permission_classes = [AllowAny]
|
|
||||||
|
|
||||||
@list_route(methods=['get'], permission_classes=[AllowAny])
|
@list_route(methods=['get'])
|
||||||
def group_by_user(self, request):
|
def group_by_user(self, request):
|
||||||
products = self.get_queryset().filter(active=True)
|
products = self.get_queryset().filter(active=True)
|
||||||
serializer = ProductStatSerializer(products, many=True)
|
serializer = ProductStatSerializer(products, many=True)
|
||||||
|
|||||||
Reference in new issue
Block a user