(toggle)
return service_type
Returns subscription service type for each toggle
Returns subscription service type for each toggle
Returns subscription service type for each toggle
def _get_service_type(toggle):
    """Returns subscription service type for each toggle
    """
    service_type = {}
    for enabled in toggle.enabled_users:
        name = _enabled_item_name(enabled)
        if _namespace_domain(enabled):
            subscription = Subscription.get_active_subscription_by_domain(name)
            if subscription:
                service_type[name] = subscription.service_type
    return service_type
def _get_service_type ( toggle ) : service_type = { } for enabled in toggle . enabled_users : name = _enabled_item_name ( enabled ) if _namespace_domain ( enabled ) : subscription = Subscription . get_active_subscription_by_domain ( name ) if subscription : service_type [ name ] = subscription . service_type return service_type