[galaxy-commits] commit/galaxy-central: dan: Allow not specifying a value attribute for an optional tool parameter. Partially resolves #661.
Bitbucket
commits-noreply at bitbucket.org
Thu Dec 8 16:57:21 EST 2011
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/changeset/75c27994fc9a/
changeset: 75c27994fc9a
user: dan
date: 2011-12-08 22:57:12
summary: Allow not specifying a value attribute for an optional tool parameter. Partially resolves #661.
affected #: 1 file
diff -r 8d668e1d51520f7663915ff5535852e47a7dd235 -r 75c27994fc9aa265bdecd6ad7962f0c4f51b3682 lib/galaxy/tools/parameters/basic.py
--- a/lib/galaxy/tools/parameters/basic.py
+++ b/lib/galaxy/tools/parameters/basic.py
@@ -224,7 +224,7 @@
int( self.value )
except:
raise ValueError( "An integer is required" )
- elif self.value is None:
+ elif self.value is None and not self.optional:
raise ValueError( "The settings for the field named '%s' require a 'value' setting and optionally a default value which must be an integer" % self.name )
self.min = elem.get( 'min' )
self.max = elem.get( 'max' )
@@ -296,7 +296,7 @@
float( self.value )
except:
raise ValueError( "A real number is required" )
- elif self.value is None:
+ elif self.value is None and not self.optional:
raise ValueError( "The settings for this field require a 'value' setting and optionally a default value which must be a real number" )
if self.min:
try:
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.
More information about the galaxy-commits
mailing list