[hg] galaxy 1467: Fix for dynamic select lists generated from co...

classic Classic list List threaded Threaded
1 message Options
| Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[hg] galaxy 1467: Fix for dynamic select lists generated from co...

Nate Coraor (nate@bx.psu.edu)
details:   http://www.bx.psu.edu/hg/galaxy/rev/95e3285790d1
changeset: 1467:95e3285790d1
user:      Dan Blankenberg <[hidden email]>
date:      Thu Aug 07 11:41:59 2008 -0400
description:
Fix for dynamic select lists generated from contents of input file when no valid datasets exist in the history.

1 file(s) affected in this change:

lib/galaxy/tools/parameters/dynamic_options.py

diffs (11 lines):

diff -r 91c63a82359a -r 95e3285790d1 lib/galaxy/tools/parameters/dynamic_options.py
--- a/lib/galaxy/tools/parameters/dynamic_options.py Mon Aug 04 10:20:23 2008 -0400
+++ b/lib/galaxy/tools/parameters/dynamic_options.py Thu Aug 07 11:41:59 2008 -0400
@@ -363,6 +363,7 @@
         if self.dataset_ref_name:
             dataset = other_values.get( self.dataset_ref_name, None )
             assert dataset is not None, "Required dataset '%s' missing from input" % self.dataset_ref_name
+            if not dataset: return [] #no valid dataset in history
             options = self.parse_file_fields( open( dataset.file_name ) )
         else:
             options = list( self.file_fields )

Loading...