'Default options will be "All" groups and if a facility has ungrouped students, also add an "Ungrouped" option.
Then we add the list of facilities after the above default options.
Must return no groups if there are no groups for the user.'

def obj_get_list(self, bundle, **kwargs):

    (groups, facilities, ungrouped_available) = get_accessible_objects_from_logged_in_user(bundle.request, facility=None)
    qs = []
    if facilities:
        facility_ids = facilities.values_list('id', flat=True)
        facility_id = bundle.request.GET.get('facility_id')
        if (facility_id and (facility_id != ID_NONE)):
            if (facility_id in facility_ids):
                facility = Facility.objects.get(id=facility_id)
                ungrouped_available = facility.has_ungrouped_students
                qs = FacilityGroup.objects.filter(facility__id=facility_id)
            else:
                raise BadRequest('No    facility    found    with    that    facility_id.')
        else:
            qs = FacilityGroup.objects.filter(facility__id__in=facility_ids)
    group_list = list(qs)
    return super(FacilityGroupResource, self).authorized_read_list(group_list, bundle)
