fix(node): correct conditional checks in list filter node

- 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.
This commit is contained in:
-LAN- 2024-09-29 16:33:38 +08:00
parent 584053bc01
commit e7f425be91
2 changed files with 2 additions and 2 deletions

View File

@ -27,7 +27,7 @@ class ListFilterNode(BaseNode):
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"
)

View File

@ -265,7 +265,7 @@ class AppDslService:
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,