From 3d73952d1ed8413eacd5e2af5819a9958c8ab767 Mon Sep 17 00:00:00 2001 From: Ben Burtenshaw Date: Fri, 21 Jun 2024 09:35:04 +0200 Subject: [PATCH] fix: remove name as default description in settings models --- argilla/src/argilla/_models/_settings/_questions/_base.py | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/argilla/src/argilla/_models/_settings/_questions/_base.py b/argilla/src/argilla/_models/_settings/_questions/_base.py index b235bf83e4..e55a5557ab 100644 --- a/argilla/src/argilla/_models/_settings/_questions/_base.py +++ b/argilla/src/argilla/_models/_settings/_questions/_base.py @@ -30,7 +30,7 @@ class QuestionBaseModel(BaseModel, validate_assignment=True): settings: QuestionSettings title: str = Field(None, validate_default=True) - description: Optional[str] = Field(None, validate_default=True) + description: Optional[str] = None required: bool = True inserted_at: Optional[datetime] = None updated_at: Optional[datetime] = None @@ -47,12 +47,6 @@ def __title_default(cls, title, info: ValidationInfo): validated_title = title or info.data["name"] return validated_title - @field_validator("description") - @classmethod - def __description_default(cls, description, info: ValidationInfo) -> Optional[str]: - data = info.data - return description or data["title"] - @field_serializer("inserted_at", "updated_at", when_used="unless-none") def serialize_datetime(self, value: datetime) -> str: return value.isoformat()