Skip to content

Commit

Permalink
fix: remove name as default description in settings models
Browse files Browse the repository at this point in the history
  • Loading branch information
burtenshaw committed Jun 21, 2024
1 parent 7270969 commit 3d73952
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions argilla/src/argilla/_models/_settings/_questions/_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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()
Expand Down

0 comments on commit 3d73952

Please sign in to comment.