Exemple #1
0
def convert(old_data):
    """ Convert the data from the v2 to v1 """
    new_data = {}
    transport_usable_data(new_data=new_data, old_data=old_data)
    verifications = unflatten_verifications(old_data.get('verifications', {}))
    if verifications:
        new_data['verifications'] = verifications
    satisfies = unflatten_satisfies(old_data.get('satisfies', {}))
    if satisfies:
        new_data['satisfies'] = satisfies
    return new_data
Exemple #2
0
def convert(old_data):
    """ Convert the data from the v2 to v1 """
    new_data = {}
    transport_usable_data(new_data=new_data, old_data=old_data)
    verifications = unflatten_verifications(old_data.get('verifications', {}))
    if verifications:
        new_data['verifications'] = verifications
    satisfies = unflatten_satisfies(old_data.get('satisfies', {}))
    if satisfies:
        new_data['satisfies'] = satisfies
    return new_data
Exemple #3
0
def convert(old_data):
    """ Convert the data from the v2 to v1 """
    new_data = {}
    transport_usable_data(new_data=new_data, old_data=old_data)
    verifications = flatten_verifications(old_data.get('verifications', {}))
    if verifications:
        new_data['verifications'] = verifications
    satisfies = convert_satisfies(old_data.get('satisfies', {}))
    if satisfies:
        new_data['satisfies'] = satisfies
    # Tag new schema version
    new_data['schema_version'] = 2.0
    return new_data
def convert(old_data):
    """ Convert the data from the v2 to v1 """
    new_data = {}
    transport_usable_data(new_data=new_data, old_data=old_data)
    verifications = flatten_verifications(old_data.get('verifications', {}))
    if verifications:
        new_data['verifications'] = verifications
    satisfies = convert_satisfies(old_data.get('satisfies', {}))
    if satisfies:
        new_data['satisfies'] = satisfies
    # Tag new schema version
    new_data['schema_version'] = 2.0
    return new_data