Skip to content

Commit

Permalink
fix python style for webhook url and totp url when creating a task (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
wintonzheng authored Oct 18, 2024
1 parent c657957 commit dd67713
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions skyvern/forge/agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,11 +184,13 @@ async def create_task_and_step_from_block(
return task, step

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(
url=str(task_request.url),
title=task_request.title,
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,
webhook_callback_url=webhook_callback_url,
totp_verification_url=totp_verification_url,
totp_identifier=task_request.totp_identifier,
navigation_goal=task_request.navigation_goal,
data_extraction_goal=task_request.data_extraction_goal,
Expand Down

0 comments on commit dd67713

Please sign in to comment.