def get_queryset(self, *args, **kwargs):
    if ('pk' in dict(self.kwargs)):
        if (self.request.query_params.get('block') != None):
            return ExpertiseComments.objects.filter(user_expertise__expertise=self.kwargs['pk'], comment_block=self.request.query_params.get('block'))
        else:
            return ExpertiseComments.objects.filter(user_expertise__expertise=self.kwargs['pk'])
    else:
        return ExpertiseComments.objects.all()
def get_queryset(self, *args, **kwargs):
    if ('pk' in dict(self.kwargs)):
        if (self.request.query_params.get('block') != None):
            return ExpertiseComments.objects.filter(user_expertise__expertise=self.kwargs['pk'], comment_block=self.request.query_params.get('block'))
        else:
            return ExpertiseComments.objects.filter(user_expertise__expertise=self.kwargs['pk'])
    else:
        return ExpertiseComments.objects.all()