Skip to content

Commit

Permalink
fix(node): correct conditional checks in list filter node
Browse files Browse the repository at this point in the history
- Added check for variable value before type checking in ListFilterNode to prevent unnecessary errors.
- Fixed incorrect workflow feature path in AppDslService to ensure correct data fetching.
  • Loading branch information
laipz8200 committed Sep 29, 2024
1 parent 5ecc638 commit d954e0e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion api/core/workflow/nodes/list_filter/node.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def _run(self):
return NodeRunResult(
status=WorkflowNodeExecutionStatus.FAILED, error=error_message, inputs=inputs, outputs=outputs
)
if not isinstance(variable, ArrayFileSegment | ArrayNumberSegment | ArrayStringSegment):
if variable.value and not isinstance(variable, ArrayFileSegment | ArrayNumberSegment | ArrayStringSegment):
error_message = (
f"Variable {node_data.variable} is not an ArrayFileSegment, ArrayNumberSegment " "or ArrayStringSegment"
)
Expand Down
2 changes: 1 addition & 1 deletion api/services/app_dsl_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ def _import_and_create_new_workflow_based_app(
draft_workflow = workflow_service.sync_draft_workflow(
app_model=app,
graph=workflow_data.get("graph", {}),
features=workflow_data.get("../core/app/features", {}),
features=workflow_data.get("features", {}),
unique_hash=None,
account=account,
environment_variables=environment_variables,
Expand Down

0 comments on commit d954e0e

Please sign in to comment.