Skip to content

Commit 792f882

Browse files
fix: ensure file path is list before iterating over it (#6175)
fix: Handle file path input for list-type fields in Vertex Co-authored-by: Cristhian Zanforlin Lousa <cristhian.lousa@gmail.com>
1 parent c8db2fc commit 792f882

File tree

1 file changed

+3
-6
lines changed
  • src/backend/base/langflow/graph/vertex

1 file changed

+3
-6
lines changed

src/backend/base/langflow/graph/vertex/base.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,7 @@
1414
from loguru import logger
1515

1616
from langflow.exceptions.component import ComponentBuildError
17-
from langflow.graph.schema import (
18-
INPUT_COMPONENTS,
19-
OUTPUT_COMPONENTS,
20-
InterfaceComponentTypes,
21-
ResultData,
22-
)
17+
from langflow.graph.schema import INPUT_COMPONENTS, OUTPUT_COMPONENTS, InterfaceComponentTypes, ResultData
2318
from langflow.graph.utils import UnbuiltObject, UnbuiltResult, log_transaction
2419
from langflow.interface import initialize
2520
from langflow.interface.listing import lazy_load_dict
@@ -363,6 +358,8 @@ def build_params(self) -> None:
363358
full_path: str | list[str] = ""
364359
if field.get("list"):
365360
full_path = []
361+
if isinstance(file_path, str):
362+
file_path = [file_path]
366363
for p in file_path:
367364
flow_id, file_name = os.path.split(p)
368365
path = storage_service.build_full_path(flow_id, file_name)

0 commit comments

Comments
 (0)