#NEWLINE# def candidateidSearch( queryset , querydict ) : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# candidate_id = querydict [ 'candidate_id' ] #NEWLINE# authorized_committee_list = Authorized_Candidate_Committees . objects . filter ( candidate_id = candidate_id ) #NEWLINE# committee_list = [ x . get ( 'committee_id' ) for x in authorized_committee_list . values ( 'committee_id' ) ] #NEWLINE# queryset = queryset . filter ( fec_id__in = committee_list ) #NEWLINE# #UNINDENT# except KeyError : #NEWLINE# #INDENT# pass #NEWLINE# #UNINDENT# return queryset