From 3ef1c294c9e6db03f0c4026966bfaca4082419af Mon Sep 17 00:00:00 2001 From: Parsa Nazer Date: Mon, 13 Jan 2025 17:56:57 +0330 Subject: [PATCH] fix bug product view --- backend/product/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/product/views.py b/backend/product/views.py index 013eb36..c21a5a1 100644 --- a/backend/product/views.py +++ b/backend/product/views.py @@ -24,7 +24,7 @@ class ProductView(APIView): def get(self, request, pk): product = get_object_or_404(ProductModel, id=pk) product_ser = self.serializer_class(instance=product, many=False) - return Response({product_ser.data}, status=status.HTTP_200_OK) + return Response(product_ser.data, status=status.HTTP_200_OK) class AllProductsView(APIView): serializer_class = ProductSerializer