Refactor get_full_path method in CustomComponent

This commit is contained in:
Gabriel Luiz Freitas Almeida 2024-02-07 19:13:49 -03:00
commit a2e0a6aed7

View file

@ -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):