Don't allow None for org id (partial mypy only change) more to come (#2613)
This commit is contained in:
@@ -210,7 +210,7 @@ class ForgeAgent:
|
||||
)
|
||||
return task, step
|
||||
|
||||
async def create_task(self, task_request: TaskRequest, organization_id: str | None = None) -> Task:
|
||||
async def create_task(self, task_request: TaskRequest, organization_id: str) -> Task:
|
||||
webhook_callback_url = str(task_request.webhook_callback_url) if task_request.webhook_callback_url else None
|
||||
totp_verification_url = str(task_request.totp_verification_url) if task_request.totp_verification_url else None
|
||||
task = await app.DATABASE.create_task(
|
||||
|
||||
@@ -463,7 +463,7 @@ class AgentFunction:
|
||||
return
|
||||
|
||||
async def validate_task_execution(
|
||||
self, organization_id: str | None = None, task_id: str | None = None, task_version: str | None = None
|
||||
self, organization_id: str, task_id: str | None = None, task_version: str | None = None
|
||||
) -> None:
|
||||
return
|
||||
|
||||
|
||||
@@ -312,7 +312,7 @@ class AgentDB:
|
||||
LOG.error("UnexpectedError", exc_info=True)
|
||||
raise
|
||||
|
||||
async def get_task_steps(self, task_id: str, organization_id: str | None = None) -> list[Step]:
|
||||
async def get_task_steps(self, task_id: str, organization_id: str) -> list[Step]:
|
||||
try:
|
||||
async with self.Session() as session:
|
||||
if steps := (
|
||||
|
||||
@@ -49,7 +49,7 @@ class Step(BaseModel):
|
||||
order: int
|
||||
is_last: bool
|
||||
retry_index: int = 0
|
||||
organization_id: str | None = None
|
||||
organization_id: str
|
||||
input_token_count: int = 0
|
||||
output_token_count: int = 0
|
||||
reasoning_token_count: int | None = None
|
||||
|
||||
@@ -231,7 +231,7 @@ class Task(TaskBase):
|
||||
None,
|
||||
description="The reason for the task failure.",
|
||||
)
|
||||
organization_id: str | None = None
|
||||
organization_id: str
|
||||
workflow_run_id: str | None = None
|
||||
workflow_permanent_id: str | None = None
|
||||
order: int | None = None
|
||||
|
||||
Reference in New Issue
Block a user