Fix missing type for argument in CustomComponent

class
This commit is contained in:
Gabriel Luiz Freitas Almeida 2023-11-23 10:37:59 -03:00
commit bcd13e18f3

View file

@ -3,7 +3,6 @@ from uuid import UUID
import yaml import yaml
from fastapi import HTTPException from fastapi import HTTPException
from langflow.field_typing.constants import CUSTOM_COMPONENT_SUPPORTED_TYPES from langflow.field_typing.constants import CUSTOM_COMPONENT_SUPPORTED_TYPES
from langflow.interface.custom.component import Component from langflow.interface.custom.component import Component
from langflow.interface.custom.directory_reader import DirectoryReader from langflow.interface.custom.directory_reader import DirectoryReader
@ -111,7 +110,7 @@ class CustomComponent(Component):
), ),
}, },
) )
elif not arg.get("type"): elif not arg.get("type") and arg.get("name") != "self":
# Set the type to Data # Set the type to Data
arg["type"] = "Data" arg["type"] = "Data"
return args return args