def METHOD_NAME(self, queryset, name, affiliation):
    if affiliation == "":
        return queryset
    else:
        q = Q(affiliation__icontains=affiliation) | Q(
            person__affiliation__icontains=affiliation
        )
        return queryset.filter(q).distinct()