From 8a9c2c81808f4546092621ed0b8dbb3d47dca698 Mon Sep 17 00:00:00 2001 From: Benjamin Dauvergne Date: Fri, 26 Jun 2020 11:21:16 +0200 Subject: [PATCH] lingo: keep order of regie's parameters (#44484) --- combo/apps/lingo/forms.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/combo/apps/lingo/forms.py b/combo/apps/lingo/forms.py index 34c479ba..fe50a253 100644 --- a/combo/apps/lingo/forms.py +++ b/combo/apps/lingo/forms.py @@ -40,7 +40,7 @@ def get_validator(func, err_msg): def create_form_fields(parameters, json_field): - fields, initial = {}, {} + fields, initial = [], {} for param in parameters: field_name = param['name'] if field_name in ('normal_return_url', 'automatic_return_url') or param.get('deprecated'): @@ -65,7 +65,7 @@ def create_form_fields(parameters, json_field): else: field_class = TYPE_FIELD_MAPPING[_type] - fields[field_name] = field_class(**field_params) + fields.append((field_name, field_class(**field_params))) initial_value = json_field.get(field_name, param.get('default')) if initial_value: initial[field_name] = initial_value -- 2.26.2