From 4ff34b6cc98b736b0deeaf6b1dd25404cfa09ff8 Mon Sep 17 00:00:00 2001 From: Gabriel Luiz Freitas Almeida Date: Wed, 22 Jan 2025 12:14:37 -0300 Subject: [PATCH] fix: make sure graph build errors bubble up to the frontend (#5864) fix: Add handling for None value in validate_source method to return default Source instance --- src/backend/base/langflow/schema/properties.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/backend/base/langflow/schema/properties.py b/src/backend/base/langflow/schema/properties.py index c8b57b49e..6088aaa20 100644 --- a/src/backend/base/langflow/schema/properties.py +++ b/src/backend/base/langflow/schema/properties.py @@ -28,6 +28,8 @@ class Properties(BaseModel): def validate_source(cls, v): if isinstance(v, str): return Source(id=v, display_name=v, source=v) + if v is None: + return Source() return v @field_serializer("source")