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)
Source:stackexchange.com