From a2e0a6aed775495a7c7ee5b54f63be5956f7393e Mon Sep 17 00:00:00 2001 From: Gabriel Luiz Freitas Almeida Date: Wed, 7 Feb 2024 19:13:49 -0300 Subject: [PATCH] Refactor get_full_path method in CustomComponent --- .../interface/custom/custom_component/custom_component.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/backend/langflow/interface/custom/custom_component/custom_component.py b/src/backend/langflow/interface/custom/custom_component/custom_component.py index 64839f990..542ebe75e 100644 --- a/src/backend/langflow/interface/custom/custom_component/custom_component.py +++ b/src/backend/langflow/interface/custom/custom_component/custom_component.py @@ -5,7 +5,6 @@ from uuid import UUID import yaml from cachetools import TTLCache, cachedmethod from fastapi import HTTPException - from langflow.interface.custom.code_parser.utils import ( extract_inner_type_from_generic_alias, extract_union_types_from_generic_alias, @@ -39,8 +38,7 @@ class CustomComponent(Component): def get_full_path(self, path: str) -> str: storage_svc: "StorageService" = get_storage_service() - flow_id = path.split("/")[0] - file_name = path.split("/")[1] + flow_id, file_name = path.split("/", 1) return storage_svc.build_full_path(flow_id, file_name) def custom_repr(self):