lingo: keep order of regie's parameters (#44484)
This commit is contained in:
parent
832b8188fb
commit
c43d9ee6c8
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue