Skip to content

A modern platform for visual, flexible, and extensible graph-based investigations. For cybersecurity analysts and investigators.

fix(types): make username not required for SocialAccount

dextmorgn2a378954aeb3
diff --git a/flowsint-types/src/flowsint_types/social_account.py b/flowsint-types/src/flowsint_types/social_account.py
index cabbae44..3bed5160 100644
--- a/flowsint-types/src/flowsint_types/social_account.py
+++ b/flowsint-types/src/flowsint_types/social_account.py
@@ -17,13 +17,15 @@ class SocialAccount(FlowsintType):
title="ID",
json_schema_extra={"primary": True},
)
- username: Username = Field(
- ..., description="Username associated with this account", title="Username"
+ username: Optional[Username] = Field(
+ None, description="Username associated with this account", title="Username"
)
@field_validator("username", mode="before")
@classmethod
def convert_username(cls, v: Union[str, Username]) -> Username:
+ if not v:
+ return Username(value="")
"""Convert string to Username object if needed."""
if isinstance(v, str):
return Username(value=v)