mirror of
https://github.com/Skyvern-AI/skyvern.git
synced 2025-09-17 02:39:40 +00:00
fix workflow incorrectly failed (#1312)
This commit is contained in:
parent
a206f51cb1
commit
862508e0bc
1 changed files with 9 additions and 0 deletions
|
@ -6,6 +6,7 @@ import structlog
|
|||
from skyvern.exceptions import BitwardenBaseError, WorkflowRunContextNotInitialized
|
||||
from skyvern.forge.sdk.api.aws import AsyncAWSClient
|
||||
from skyvern.forge.sdk.models import Organization
|
||||
from skyvern.forge.sdk.schemas.tasks import TaskStatus
|
||||
from skyvern.forge.sdk.services.bitwarden import BitwardenConstants, BitwardenService
|
||||
from skyvern.forge.sdk.workflow.exceptions import OutputParameterKeyCollisionError
|
||||
from skyvern.forge.sdk.workflow.models.parameter import (
|
||||
|
@ -374,6 +375,14 @@ class WorkflowRunContext:
|
|||
and isinstance(parameter.source, OutputParameter)
|
||||
and parameter.source.key == output_parameter.key
|
||||
):
|
||||
# If task isn't completed, we should skip setting the value
|
||||
if (
|
||||
isinstance(value, dict)
|
||||
and "extracted_information" in value
|
||||
and "status" in value
|
||||
and value["status"] != TaskStatus.completed
|
||||
):
|
||||
continue
|
||||
if isinstance(value, dict) and "errors" in value and value["errors"]:
|
||||
# Is this the correct way to handle errors from task blocks?
|
||||
LOG.error(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue