Fix the recently introduced ColumnListParameter.from_html() method to handle multi-select lists - should fix at least the tabular2fasta broken functional test.

This commit is contained in:
Greg Von Kuster
2009-12-09 12:18:27 -05:00
parent a3aaa1e780
commit d309fe37f3
+9 -1
View File
@@ -769,7 +769,15 @@ class ColumnListParameter( SelectToolParameter ):
Label convention prepends column number with a 'c', but tool uses the integer. This
removes the 'c' when entered into a workflow.
"""
if value.startswith("c"):
if type( value ) == list:
# We have a multi-select list
new_value = []
for item in value:
if item.startswith( "c" ):
item = item[1:]
new_value.append( item )
value = new_value
elif value and value.startswith( "c" ):
value = value[1:]
return super( ColumnListParameter, self ).from_html( value, trans, context )
def get_column_list( self, trans, other_values ):