def candidateidSearch(queryset, querydict):
    try:
        candidate_id = querydict['candidate_id']
        authorized_committee_list = Authorized_Candidate_Committees.objects.filter(candidate_id=candidate_id)
        committee_list = [x.get('committee_id') for x in authorized_committee_list.values('committee_id')]
        queryset = queryset.filter(fec_id__in=committee_list)

    except __HOLE__:
        pass
    return queryset
dataset/ETHPy150Open sunlightlabs/read_FEC/fecreader/api/filters.py/candidateidSearch