fix python style for webhook url and totp url when creating a task (#1003)
This commit is contained in:
@@ -184,11 +184,13 @@ class ForgeAgent:
|
|||||||
return task, step
|
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 | None = None) -> 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(
|
task = await app.DATABASE.create_task(
|
||||||
url=str(task_request.url),
|
url=str(task_request.url),
|
||||||
title=task_request.title,
|
title=task_request.title,
|
||||||
webhook_callback_url=str(task_request.webhook_callback_url) if task_request.webhook_callback_url else None,
|
webhook_callback_url=webhook_callback_url,
|
||||||
totp_verification_url=str(task_request.totp_verification_url) if task_request.totp_verification_url else None,
|
totp_verification_url=totp_verification_url,
|
||||||
totp_identifier=task_request.totp_identifier,
|
totp_identifier=task_request.totp_identifier,
|
||||||
navigation_goal=task_request.navigation_goal,
|
navigation_goal=task_request.navigation_goal,
|
||||||
data_extraction_goal=task_request.data_extraction_goal,
|
data_extraction_goal=task_request.data_extraction_goal,
|
||||||
|
|||||||
Reference in New Issue
Block a user