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>
This commit is contained in:
parent
c8db2fcde0
commit
792f882088
1 changed files with 3 additions and 6 deletions
|
|
@ -14,12 +14,7 @@ import pandas as pd
|
|||
from loguru import logger
|
||||
|
||||
from langflow.exceptions.component import ComponentBuildError
|
||||
from langflow.graph.schema import (
|
||||
INPUT_COMPONENTS,
|
||||
OUTPUT_COMPONENTS,
|
||||
InterfaceComponentTypes,
|
||||
ResultData,
|
||||
)
|
||||
from langflow.graph.schema import INPUT_COMPONENTS, OUTPUT_COMPONENTS, InterfaceComponentTypes, ResultData
|
||||
from langflow.graph.utils import UnbuiltObject, UnbuiltResult, log_transaction
|
||||
from langflow.interface import initialize
|
||||
from langflow.interface.listing import lazy_load_dict
|
||||
|
|
@ -363,6 +358,8 @@ class Vertex:
|
|||
full_path: str | list[str] = ""
|
||||
if field.get("list"):
|
||||
full_path = []
|
||||
if isinstance(file_path, str):
|
||||
file_path = [file_path]
|
||||
for p in file_path:
|
||||
flow_id, file_name = os.path.split(p)
|
||||
path = storage_service.build_full_path(flow_id, file_name)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue