Skip to content

Commit 5757eb8

Browse files
fix: validator
1 parent 9fb1220 commit 5757eb8

File tree

1 file changed

+1
-5
lines changed
  • packages/models-library/src/models_library/api_schemas_webserver

1 file changed

+1
-5
lines changed

packages/models-library/src/models_library/api_schemas_webserver/projects.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ class ProjectGet(OutputSchema):
126126

127127
# display
128128
name: str
129-
description: str
129+
description: Annotated[str, BeforeValidator(none_to_empty_str_pre_validator)]
130130
thumbnail: HttpUrl | Literal[""]
131131

132132
type: ProjectType
@@ -166,10 +166,6 @@ class ProjectGet(OutputSchema):
166166
workspace_id: WorkspaceID | None
167167
folder_id: FolderID | None
168168

169-
_empty_description = field_validator("description", mode="before")(
170-
none_to_empty_str_pre_validator
171-
)
172-
173169
@staticmethod
174170
def _update_json_schema_extra(schema: JsonDict) -> None:
175171
schema.update(

0 commit comments

Comments
 (0)