[Fixed]-Expected a `Response`, `HttpResponse` or `HttpStreamingResponse` to be returned from the view, but received a `<class 'NoneType'>`

20👍

You should add return before Response.

def get(self, request, pk):
    wishlist = get_list_or_404(Wishlist, user=pk)
    data = serializers.UserWishlistSerializer(wishlist).data
    return Response(data, status=status.HTTP_200_OK)

Leave a comment