def filter(self, qs, value):
        if value:
            resource_models = SupportedServices.get_resource_models()
            try:
                model = resource_models[value]
                ct = ContentType.objects.get_for_model(model)
                return super(ResourceTypeFilter, self).filter(qs, ct)
            except (ContentType.DoesNotExist, __HOLE__):
                return qs.none()
        return qs
dataset/ETHPy150Open opennode/nodeconductor/nodeconductor/cost_tracking/filters.py/ResourceTypeFilter.filter