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
This commit is contained in:
Gabriel Luiz Freitas Almeida 2025-01-22 12:14:37 -03:00 committed by GitHub
commit 4ff34b6cc9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

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