Skip to content

Commit af8f72e

Browse files
ignore duplicate options for selects
1 parent e0385fa commit af8f72e

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

ctdconverter/galaxy/converter.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1268,7 +1268,12 @@ def create_param_attribute_list(param, model, supported_file_formats, parameter_
12681268
if is_default(fmt, param):
12691269
option_node.attrib["selected"] = "true"
12701270
else:
1271+
unique_choices = set()
12711272
for choice in param.restrictions.choices:
1273+
if str(choice) in unique_choices:
1274+
logger.warning(f"Option {choice} of {param} is not unique.")
1275+
else:
1276+
unique_choices.add(str(choice))
12721277
option_node = add_child_node(param_node, "option",
12731278
OrderedDict([("value", str(choice))]),
12741279
text=str(choice))

0 commit comments

Comments
 (0)