[Answered ]-'CustomUser' object is not iterable

1👍

try

....
    def get_queryset(self):
        return CustomUser.objects.filter(email=self.request.user)

    def get(self, request, id=None):
        if id:
            return self.retrieve(request)
        else:
            return self.list(request)

Leave a comment