make task block title empty string by default; use task_block.label for the running task.title if task_block.title is empty (#1181)
This commit is contained in:
@@ -131,7 +131,7 @@ class ForgeAgent:
|
|||||||
task_url = validate_url(task_url)
|
task_url = validate_url(task_url)
|
||||||
task = await app.DATABASE.create_task(
|
task = await app.DATABASE.create_task(
|
||||||
url=task_url,
|
url=task_url,
|
||||||
title=task_block.title,
|
title=task_block.title or task_block.label,
|
||||||
webhook_callback_url=None,
|
webhook_callback_url=None,
|
||||||
totp_verification_url=task_block.totp_verification_url,
|
totp_verification_url=task_block.totp_verification_url,
|
||||||
totp_identifier=task_block.totp_identifier,
|
totp_identifier=task_block.totp_identifier,
|
||||||
|
|||||||
@@ -170,7 +170,7 @@ class TaskBlock(Block):
|
|||||||
block_type: Literal[BlockType.TASK] = BlockType.TASK
|
block_type: Literal[BlockType.TASK] = BlockType.TASK
|
||||||
|
|
||||||
url: str | None = None
|
url: str | None = None
|
||||||
title: str = "Untitled Task"
|
title: str = ""
|
||||||
navigation_goal: str | None = None
|
navigation_goal: str | None = None
|
||||||
data_extraction_goal: str | None = None
|
data_extraction_goal: str | None = None
|
||||||
data_schema: dict[str, Any] | list | None = None
|
data_schema: dict[str, Any] | list | None = None
|
||||||
|
|||||||
@@ -117,7 +117,7 @@ class TaskBlockYAML(BlockYAML):
|
|||||||
block_type: Literal[BlockType.TASK] = BlockType.TASK # type: ignore
|
block_type: Literal[BlockType.TASK] = BlockType.TASK # type: ignore
|
||||||
|
|
||||||
url: str | None = None
|
url: str | None = None
|
||||||
title: str = "Untitled Task"
|
title: str = ""
|
||||||
navigation_goal: str | None = None
|
navigation_goal: str | None = None
|
||||||
data_extraction_goal: str | None = None
|
data_extraction_goal: str | None = None
|
||||||
data_schema: dict[str, Any] | list | None = None
|
data_schema: dict[str, Any] | list | None = None
|
||||||
|
|||||||
Reference in New Issue
Block a user