(feature_rates, features, edition, verbose, apps)
return db_feature_rates
Ensures that all the FeatureRates necessary for the plans are created.
Ensures that all the FeatureRates necessary for the plans are created.
Ensures that all the FeatureRates necessary for the plans are created .
def _ensure_feature_rates(feature_rates, features, edition, verbose, apps):
    """
    Ensures that all the FeatureRates necessary for the plans are created.
    """
    FeatureRate = apps.get_model('accounting', 'FeatureRate')

    if verbose:
        log_accounting_info('Ensuring Feature Rates')

    db_feature_rates = []
    for feature in features:
        feature_rate = FeatureRate(**feature_rates[feature.feature_type])
        feature_rate.feature = feature
        if verbose:
            log_accounting_info("Creating rate for feature '%s': %s" % (feature.name, feature_rate))
        db_feature_rates.append(feature_rate)
    return db_feature_rates
def _ensure_feature_rates ( feature_rates , features , edition , verbose , apps ) : FeatureRate = apps . get_model ( 'accounting' , 'FeatureRate' ) if verbose : log_accounting_info ( 'Ensuring Feature Rates' ) db_feature_rates = [ ] for feature in features : feature_rate = FeatureRate ( * * feature_rates [ feature . feature_type ] ) feature_rate . feature = feature if verbose : log_accounting_info ( "Creating rate for feature '%s': %s" % ( feature . name , feature_rate ) ) db_feature_rates . append ( feature_rate ) return db_feature_rates