Fix Taskv2 (#2419)

This commit is contained in:
Shuchang Zheng
2025-05-21 20:07:49 -07:00
committed by GitHub
parent 87d0f364f5
commit fb41ff843e
2 changed files with 3 additions and 3 deletions

View File

@@ -24,8 +24,8 @@ ALGORITHM = "HS256"
async def get_current_org(
x_api_key: Annotated[str | None, Header()] = None,
authorization: Annotated[str | None, Header()] = None,
x_api_key: Annotated[str | None, Header(description="API key for authentication")] = None,
authorization: Annotated[str | None, Header(include_in_schema=False)] = None,
) -> Organization:
if not x_api_key and not authorization:
raise HTTPException(

View File

@@ -494,8 +494,8 @@ async def run_task_v2_helper(
browser_state = app.BROWSER_MANAGER.get_for_workflow_run(
workflow_run_id=workflow_run_id, parent_workflow_run_id=workflow_run.parent_workflow_run_id
)
fallback_occurred = False
if browser_state is None:
fallback_occurred = False
try:
browser_state = await app.BROWSER_MANAGER.get_or_create_for_workflow_run(
workflow_run=workflow_run,