diff --git a/backend/product/views.py b/backend/product/views.py index 260beb7..7f6754a 100644 --- a/backend/product/views.py +++ b/backend/product/views.py @@ -171,9 +171,7 @@ class AllProductsView(APIView): # Price filters price_gte = request.query_params.get('price_gte', None) price_lte = request.query_params.get('price_lte', None) - - if type(price_gte) != int or type(price_lte) != int: - return Response({'detail': 'value error price_gte and price_lte should be a number'}, status=status.HTTP_400_BAD_REQUEST) + if price_gte: products = products.filter(price__gte=price_gte) if price_lte: