From 5852204d08a8465975fa490bc7aea6d4accd9e4a Mon Sep 17 00:00:00 2001 From: Gabriel Luiz Freitas Almeida Date: Thu, 20 Jun 2024 21:49:45 -0300 Subject: [PATCH] refactor: Update SourceHandle class to use default_factory for output_types --- src/backend/base/langflow/graph/edge/base.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/backend/base/langflow/graph/edge/base.py b/src/backend/base/langflow/graph/edge/base.py index d5b4b3ca0..c9fe43478 100644 --- a/src/backend/base/langflow/graph/edge/base.py +++ b/src/backend/base/langflow/graph/edge/base.py @@ -15,9 +15,7 @@ class SourceHandle(BaseModel): dataType: str = Field(..., description="Data type for the source handle.") id: str = Field(..., description="Unique identifier for the source handle.") name: Optional[str] = Field(None, description="Name of the source handle.") - output_types: Optional[List[str]] = Field( - default_factory=list, description="List of output types for the source handle." - ) + output_types: List[str] = Field(default_factory=list, description="List of output types for the source handle.") @field_validator("name", mode="before") @classmethod