Commit 76fe2219 authored by Willem ter Berg's avatar Willem ter Berg 💬
Browse files

dict to list conversion because of reasons...

parent be5b2d7a
Loading
Loading
Loading
Loading
+9 −1
Original line number Diff line number Diff line
@@ -30,7 +30,7 @@ def is_list(value):
    :return: list, the original value
    """
    if not isinstance(value, list):
        raise tk.Invalid('value must be a list')
        raise tk.Invalid('value [' + value + '] must be a list')

    return value

@@ -70,6 +70,14 @@ def convert_to_list_if_string(key, data_dict, errors, context):
        values = values.replace('"', '')
        data_dict[key] = values[1:len(values) - 1].split(',')

    if isinstance(values, dict):
        converted = []

        for item in values:
            converted.append(item)

        data_dict[key] = converted

    return key, data_dict, errors, context