Refactor get_full_path method in CustomComponent
This commit is contained in:
parent
de854325ed
commit
a2e0a6aed7
1 changed files with 1 additions and 3 deletions
|
|
@ -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):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue