Skip to content

Instantly share code, notes, and snippets.

@jmchilton
Created August 20, 2014 00:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jmchilton/b9ae7588de4b21e59cec to your computer and use it in GitHub Desktop.
Save jmchilton/b9ae7588de4b21e59cec to your computer and use it in GitHub Desktop.
fix history
diff --git a/lib/galaxy/webapps/galaxy/controllers/workflow.py b/lib/galaxy/webapps/galaxy/controllers/workflow.py
index bf927d1..c80cdbe 100644
--- a/lib/galaxy/webapps/galaxy/controllers/workflow.py
+++ b/lib/galaxy/webapps/galaxy/controllers/workflow.py
@@ -1268,6 +1268,7 @@ class WorkflowController( BaseUIController, SharableMixin, UsesStoredWorkflowMix
except:
error("That history does not exist.")
try: # use a try/finally block to restore the user's current history
+ default_target_history = trans.get_history()
if kwargs:
# If kwargs were provided, the states for each step should have
# been POSTed
@@ -1329,7 +1330,7 @@ class WorkflowController( BaseUIController, SharableMixin, UsesStoredWorkflowMix
trans.sa_session.add( new_history )
target_history = new_history
else:
- target_history = trans.get_history()
+ target_history = default_target_history
# Build replacement dict for this workflow execution.
replacement_dict = {}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment