details: http://www.bx.psu.edu/hg/galaxy/rev/8783747cbae8 changeset: 2404:8783747cbae8 user: James Taylor <james@jamestaylor.org> date: Wed May 06 13:17:02 2009 -0400 description: Fix problem constructing workflows from histories -- problem existed when only a single dataset or job was selected, it was testing for the parameter being of type str, but parameters are now unicode, so (for example) the id 147 was converted to [1,4,7]. Fixed by testing for list (multiple parameter values should always come in as a list. There may be other similar problems where parameters are assumed to be str. 1 file(s) affected in this change: lib/galaxy/web/controllers/workflow.py diffs (26 lines): diff -r 8be3989335a9 -r 8783747cbae8 lib/galaxy/web/controllers/workflow.py --- a/lib/galaxy/web/controllers/workflow.py Tue May 05 22:44:30 2009 -0400 +++ b/lib/galaxy/web/controllers/workflow.py Wed May 06 13:17:02 2009 -0400 @@ -441,11 +441,11 @@ # Ensure job_ids and dataset_ids are lists (possibly empty) if job_ids is None: job_ids = [] - elif type( job_ids ) == str: + elif type( job_ids ) is not list: job_ids = [ job_ids ] if dataset_ids is None: dataset_ids = [] - elif type( dataset_ids ) == str: + elif type( dataset_ids ) is not list: dataset_ids = [ dataset_ids ] # Convert both sets of ids to integers job_ids = [ int( id ) for id in job_ids ] @@ -455,7 +455,7 @@ jobs, warnings = get_job_dict( trans ) jobs_by_id = dict( ( job.id, job ) for job in jobs.keys() ) steps = [] - steps_by_job_id= {} + steps_by_job_id = {} hid_to_output_pair = {} # Input dataset steps for hid in dataset_ids: