commit/galaxy-central: dan: Fixes for SelectToolParameters when changing from an unspecified selection (e.g. Unvalidated) to an existing value.
1 new changeset in galaxy-central: http://bitbucket.org/galaxy/galaxy-central/changeset/d6b048e3483e/ changeset: d6b048e3483e user: dan date: 2011-06-08 23:47:36 summary: Fixes for SelectToolParameters when changing from an unspecified selection (e.g. Unvalidated) to an existing value. affected #: 2 files (233 bytes) --- a/lib/galaxy/datatypes/registry.py Wed Jun 08 17:17:11 2011 -0400 +++ b/lib/galaxy/datatypes/registry.py Wed Jun 08 17:47:36 2011 -0400 @@ -388,9 +388,9 @@ """Returns ( target_ext, existing converted dataset )""" for convert_ext in self.get_converters_by_datatype( dataset.ext ): if isinstance( self.get_datatype_by_extension( convert_ext ), accepted_formats ): - dataset = dataset.get_converted_files_by_type( convert_ext ) - if dataset: - ret_data = dataset + converted_dataset = dataset.get_converted_files_by_type( convert_ext ) + if converted_dataset: + ret_data = converted_dataset elif not converter_safe: continue else: --- a/lib/galaxy/tools/parameters/basic.py Wed Jun 08 17:17:11 2011 -0400 +++ b/lib/galaxy/tools/parameters/basic.py Wed Jun 08 17:47:36 2011 -0400 @@ -603,8 +603,9 @@ # Dynamic options are not yet supported in workflow, allow # specifying the value as text for now. if self.need_late_validation( trans, context ): - assert isinstance( value, UnvalidatedValue ) - value = value.value + if value is not None: + assert isinstance( value, UnvalidatedValue ), "Late validation needed for '%s', but provided value (%s) is not of type UnvalidatedValue (%s)." % ( self.name, value, type( value ) ) + value = value.value if self.multiple: if value is None: value = "" @@ -644,13 +645,11 @@ assert self.multiple, "Multiple values provided but parameter is not expecting multiple values" rval = [] for v in value: - v = util.restore_text( v ) if v not in legal_values: raise ValueError( "An invalid option was selected, please verify" ) rval.append( v ) return rval else: - value = util.restore_text( value ) if value not in legal_values: raise ValueError( "An invalid option was selected, please verify" ) return value @@ -1099,7 +1098,7 @@ # specifying the value as text for now. if self.need_late_validation( trans, other_values ): if value is not None: - assert isinstance( value, UnvalidatedValue ) + assert isinstance( value, UnvalidatedValue ), "Late validation needed for '%s', but provided value (%s) is not of type UnvalidatedValue (%s)." % ( self.name, value, type( value ) ) value = value.value if self.multiple: if value is None: @@ -1127,7 +1126,7 @@ rval = [] for val in value: if val not in self.get_legal_values( trans, other_values ): raise ValueError( "An invalid option was selected, please verify" ) - rval.append( util.restore_text( val ) ) + rval.append( val ) return rval def to_param_dict_string( self, value, other_values={} ): Repository URL: https://bitbucket.org/galaxy/galaxy-central/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email.
participants (1)
-
Bitbucket