Skip to content

Commit

Permalink
Merge pull request galaxyproject#17640 from mvdbeek/no_500_anon_invoc…
Browse files Browse the repository at this point in the history
…ations

[24.0] Prevent 500 for anon /api/invocations
  • Loading branch information
mvdbeek authored Mar 8, 2024
2 parents 8c22a09 + 0aff259 commit 74c8ded
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/galaxy/webapps/galaxy/api/workflows.py
Original file line number Diff line number Diff line change
Expand Up @@ -1296,6 +1296,10 @@ def index_invocations(
include_nested_invocations: bool = True,
trans: ProvidesUserContext = DependsOnTrans,
) -> List[WorkflowInvocationResponse]:
if not trans.user:
# Anon users don't have accessible invocations (currently, though published invocations should be a thing)
response.headers["total_matches"] = "0"
return []
invocation_payload = InvocationIndexPayload(
workflow_id=workflow_id,
history_id=history_id,
Expand Down

0 comments on commit 74c8ded

Please sign in to comment.