def reportTypeFilter(queryset, querydict):
    try:
        report_type=querydict['report_type']
        if report_type == 'monthly':
            queryset = queryset.filter(form_type__in=['F3X', 'F3XN', 'F3XA', 'F3', 'F3A', 'F3N', 'F3P', 'F3PA', 'F3PN'])
            
        elif report_type == 'ies':
            queryset = queryset.filter(form_type__in=['F5', 'F5N', 'F5A', 'F24', 'F24A', 'F24N'])
            
        elif report_type == 'F6':
            queryset = queryset.filter(form_type__in=['F6', 'F6N', 'F6A'])
            
        elif report_type == 'F9':
            queryset = queryset.filter(form_type__in=['F9', 'F9N', 'F9A'])
            
        elif report_type == 'F2':
            queryset = queryset.filter(form_type__in=['F2', 'F2N', 'F2A'])
            
        elif report_type == 'F1':
            queryset = queryset.filter(form_type__in=['F1', 'F1N', 'F1A'])

        elif report_type == 'F13':
            queryset = queryset.filter(form_type__in=['F13', 'F13N', 'F13A'])
            
        elif report_type == 'F4':
            queryset = queryset.filter(form_type__in=['F4', 'F4N', 'F4A'])                        
    except __HOLE__:
        pass
    
    return queryset
dataset/ETHPy150Open sunlightlabs/read_FEC/fecreader/api/filters.py/reportTypeFilter