This commit is contained in:
Emmanuel Garette 2021-11-24 19:15:38 +01:00
parent a1277bbbc7
commit 56d0a610ff
1 changed files with 2 additions and 2 deletions

View File

@ -139,7 +139,7 @@ class RougailUpgrade:
for name in choices:
choice = SubElement(variable, 'choice')
choice.text = name
if not has_value:
if not has_value and choices[0]['type'] != 'variable':
value = SubElement(variable, 'value')
value.text = choices[0]
variable.attrib['mandatory'] = 'True'
@ -235,7 +235,7 @@ class RougailUpgrade:
function.append(param)
else:
choice = SubElement(target, 'choice')
if first_choice is None:
if first_choice is None and ('type' not in param.attrib or param.attrib['type'] != 'variable'):
first_choice = choice
choice.text = param.text
if 'type' not in param.attrib and param.text is None: