diff --git a/openstack_dashboard/dashboards/project/stacks/forms.py b/openstack_dashboard/dashboards/project/stacks/forms.py index b84f22ba1b..5ee01dfdcf 100644 --- a/openstack_dashboard/dashboards/project/stacks/forms.py +++ b/openstack_dashboard/dashboards/project/stacks/forms.py @@ -327,6 +327,10 @@ class CreateStackForm(forms.SelfHandlingForm): field_args['choices'] = choices field = forms.ChoiceField(**field_args) + elif param_type == 'Json' and 'Default' in param: + field_args['initial'] = json.dumps(param['Default']) + field = forms.CharField(**field_args) + elif param_type in ('CommaDelimitedList', 'String', 'Json'): if 'MinLength' in param: field_args['min_length'] = int(param['MinLength']) diff --git a/tox.ini b/tox.ini index 9781ffe06e..ff7a88dbab 100644 --- a/tox.ini +++ b/tox.ini @@ -60,7 +60,7 @@ downloadcache = ~/cache/pip exclude = .venv,.git,.tox,dist,*openstack/common*,*lib/python*,*egg,build,panel_template,dash_template,local_settings.py,*/local/*,*/test/test_plugins/*,.ropeproject # H405 multi line docstring summary not separated with an empty line ignore = H405 -max-complexity = 19 +max-complexity = 20 [hacking] import_exceptions = collections.defaultdict,