diff --git a/agenta-cli/agenta/sdk/middleware/auth.py b/agenta-cli/agenta/sdk/middleware/auth.py index c51e0614f7..c02e46322a 100644 --- a/agenta-cli/agenta/sdk/middleware/auth.py +++ b/agenta-cli/agenta/sdk/middleware/auth.py @@ -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) @@ -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