Skip to content

Commit

Permalink
Restore back condition to set current history in backend
Browse files Browse the repository at this point in the history
The effect of this is that we can switch to any owned history in the UI, but if the history has been deleted it will not change the current history in the backend and a browser refresh will bring back the real current history.
  • Loading branch information
davelopez committed May 27, 2024
1 parent a9de122 commit 3bcc171
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/galaxy/webapps/base/webapp.py
Original file line number Diff line number Diff line change
Expand Up @@ -914,7 +914,7 @@ def get_history(self, create=False, most_recent=False):
return history

def set_history(self, history):
if history:
if history and not history.deleted:
self.galaxy_session.current_history = history
self.sa_session.add(self.galaxy_session)
with transaction(self.sa_session):
Expand All @@ -932,7 +932,7 @@ def get_or_create_default_history(self):

# Just return the current history if one exists and is not deleted.
history = self.galaxy_session.current_history
if history:
if history and not history.deleted:
return history

# Look for an existing history that has the default name, is not
Expand Down

0 comments on commit 3bcc171

Please sign in to comment.