

def get_queryset(self, request, params):
    queryset = self.model.objects.all()
    if (params.get('unpublished') and can_change_category(request.user)):
        return queryset
    return queryset.published()

dataset/ETHPy150Open chop-dbhi/serrano/serrano/resources/category.py CategoryBase.get_queryset/original