Skip to content

Commit

Permalink
Merge pull request #2310 from Agenta-AI/fix/prerelease-0-28-0a2
Browse files Browse the repository at this point in the history
[Fix] missing `project_id` in auth middleware in SDK
  • Loading branch information
jp-agenta authored Nov 27, 2024
2 parents a0d9310 + 053de52 commit 5fb7f0b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion agenta-cli/agenta/sdk/middleware/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ async def dispatch(
self,
request: Request,
call_next: Callable,
project_id: Optional[UUID] = None,
):
if AGENTA_UNAUTHORIZED_EXECUTION_ALLOWED:
return await call_next(request)
Expand All @@ -85,6 +84,8 @@ async def dispatch(
"resource_id": self.resource_id,
}

project_id = request.query_params.get("project_id")

if project_id:
params["project_id"] = project_id

Expand Down

0 comments on commit 5fb7f0b

Please sign in to comment.