Use "Default", "Value" and "DefaultValue" for Heat parameters
It seems there has been changes in the Heat API, and it no longer returns the default value for a parameter in the "Default" key, it has been instead renamed to "DefaultValue" and later to "Value". This patch makes it use all those key names, whichever exists. Change-Id: Ia86d8d79fcd48974ffe3fecf21a7153bf2ba6a9a
This commit is contained in:
parent
3c1379b5c0
commit
39e2bb784c
@ -322,11 +322,14 @@ class CreateStackForm(forms.SelfHandlingForm):
|
||||
for param_key, param in params_in_order:
|
||||
field = None
|
||||
field_key = self.param_prefix + param_key
|
||||
initial = param.get('Value',
|
||||
param.get('DefaultValue',
|
||||
param.get('Default')))
|
||||
field_args = {
|
||||
'initial': param.get('Default', None),
|
||||
'initial': initial,
|
||||
'label': param.get('Label', param_key),
|
||||
'help_text': html.escape(param.get('Description', '')),
|
||||
'required': param.get('Default', None) is None
|
||||
'required': initial is None,
|
||||
}
|
||||
|
||||
param_type = param.get('Type', None)
|
||||
|
Loading…
Reference in New Issue
Block a user