Skip to content

Commit

Permalink
Update lib/galaxy/webapps/galaxy/controllers/history.py
Browse files Browse the repository at this point in the history
Co-authored-by: Marius van den Beek <[email protected]>
  • Loading branch information
jdavcs and mvdbeek authored Sep 22, 2023
1 parent 15d8ca8 commit c5650e6
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions lib/galaxy/webapps/galaxy/controllers/history.py
Original file line number Diff line number Diff line change
Expand Up @@ -516,11 +516,8 @@ def display_by_username_and_slug(self, trans, username, slug, **kwargs):
# Get history.
session = trans.sa_session

stmt = select(model.User).filter_by(username=username).limit(1)
user = session.scalars(stmt).first()

stmt = select(model.History).filter_by(user=user, slug=slug, deleted=False).limit(1)
history = session.scalars(stmt).first()
user = session.scalars(select(model.User).filter_by(username=username).limit(1)).first()
history = session.scalars(select(model.History).filter_by(user=user, slug=slug, deleted=False).limit(1)).first()

if history is None:
raise web.httpexceptions.HTTPNotFound()
Expand Down

0 comments on commit c5650e6

Please sign in to comment.