a
This commit is contained in:
@@ -172,8 +172,6 @@ class AllProductsView(APIView):
|
||||
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:
|
||||
|
||||
Reference in New Issue
Block a user