Skip to content

Commit

Permalink
Require trans.user or trans.galaxy_session
Browse files Browse the repository at this point in the history
  • Loading branch information
mvdbeek committed Mar 16, 2024
1 parent 6b3c3f0 commit 1fe6f0a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/galaxy/webapps/galaxy/api/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -363,8 +363,8 @@ def get_or_create_default_history(
trans: SessionRequestContext = DependsOnTrans,
session_manager=cast(GalaxySessionManager, Depends(get_session_manager)),
):
if not trans.galaxy_session:
raise RequestParameterMissingException("No galaxysession cookie provided")
if not trans.user and not trans.galaxy_session:
raise RequestParameterMissingException("Cannot fetch or create history for unknown user session")
history = session_manager.get_or_create_default_history(trans.galaxy_session, trans.app.security_agent)
trans.history = history
return history
Expand Down

0 comments on commit 1fe6f0a

Please sign in to comment.