[galaxy-commits] commit/galaxy-central: greg: Fix for comparing workflows in repository metadata when resetting all metadata on a tool shed repository.
Bitbucket
commits-noreply at bitbucket.org
Thu Jan 19 14:23:51 EST 2012
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/changeset/5ecec0d06179/
changeset: 5ecec0d06179
user: greg
date: 2012-01-19 20:23:41
summary: Fix for comparing workflows in repository metadata when resetting all metadata on a tool shed repository.
affected #: 1 file
diff -r d1e723facfcc043c18f8aa7e9b10797c5f947bdf -r 5ecec0d061792687699a04543cfe80b7125f54b4 lib/galaxy/webapps/community/controllers/common.py
--- a/lib/galaxy/webapps/community/controllers/common.py
+++ b/lib/galaxy/webapps/community/controllers/common.py
@@ -628,16 +628,20 @@
# Determine if ancestor_workflows is the same as current_workflows
# or if ancestor_workflows is a subset of current_workflows.
if len( ancestor_workflows ) <= len( current_workflows ):
- for ancestor_workflow in ancestor_workflows:
+ for ancestor_workflow_tup in ancestor_workflows:
+ # ancestor_workflows is a list of tuples where each contained tuple is
+ # [ <relative path to the .ga file in the repository>, <exported workflow dict> ]
+ ancestor_workflow_dict = ancestor_workflow_tup[1]
# Currently the only way to differentiate workflows is by name.
- ancestor_workflow_name = ancestor_workflow[ 'name' ]
- num_ancestor_workflow_steps = len( ancestor_workflow[ 'steps' ] )
+ ancestor_workflow_name = ancestor_workflow_dict[ 'name' ]
+ num_ancestor_workflow_steps = len( ancestor_workflow_dict[ 'steps' ] )
found_in_current = False
- for current_workflow in current_workflows:
+ for current_workflow_tup in current_workflows:
+ current_workflow_dict = current_workflow_tup[1]
# Assume that if the name and number of steps are euqal,
# then the workflows are the same. Of course, this may
# not be true...
- if current_workflow[ 'name' ] == ancestor_workflow_name and len( current_workflow[ 'steps' ] ) == num_ancestor_workflow_steps:
+ if current_workflow_dict[ 'name' ] == ancestor_workflow_name and len( current_workflow_dict[ 'steps' ] ) == num_ancestor_workflow_steps:
found_in_current = True
break
if not found_in_current:
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