Revert "Remove code generation deletion confirmation prompt" (#4639)
Co-authored-by: Suchintan Singh <suchintan@skyvern.com>
This commit is contained in:
@@ -25,6 +25,7 @@ from skyvern import analytics
|
||||
from skyvern._version import __version__
|
||||
from skyvern.config import settings
|
||||
from skyvern.exceptions import (
|
||||
CannotUpdateWorkflowDueToCodeCache,
|
||||
MissingBrowserAddressError,
|
||||
SkyvernHTTPException,
|
||||
)
|
||||
@@ -910,6 +911,7 @@ async def update_workflow_legacy(
|
||||
..., description="The ID of the workflow to update. Workflow ID starts with `wpid_`.", examples=["wpid_123"]
|
||||
),
|
||||
current_org: Organization = Depends(org_auth_service.get_current_org),
|
||||
delete_code_cache_is_ok: bool = Query(False),
|
||||
) -> Workflow:
|
||||
analytics.capture("skyvern-oss-agent-workflow-update")
|
||||
# validate the workflow
|
||||
@@ -925,7 +927,13 @@ async def update_workflow_legacy(
|
||||
organization=current_org,
|
||||
request=workflow_create_request,
|
||||
workflow_permanent_id=workflow_id,
|
||||
delete_code_cache_is_ok=delete_code_cache_is_ok,
|
||||
)
|
||||
except CannotUpdateWorkflowDueToCodeCache as e:
|
||||
raise HTTPException(
|
||||
status_code=422,
|
||||
detail=str(e),
|
||||
) from e
|
||||
except WorkflowDefinitionValidationException as e:
|
||||
raise e
|
||||
except (SkyvernHTTPException, ValidationError) as e:
|
||||
|
||||
Reference in New Issue
Block a user