From a0d35d2554dfb384edc54804d8ec7d985b98b03c Mon Sep 17 00:00:00 2001 From: Patrick Bassner Date: Tue, 3 Sep 2024 12:03:23 +0200 Subject: [PATCH] Added default values to SimpleSubmissionDTO fields --- app/domain/data/simple_submission_dto.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/app/domain/data/simple_submission_dto.py b/app/domain/data/simple_submission_dto.py index 53b1c9fa..df96665a 100644 --- a/app/domain/data/simple_submission_dto.py +++ b/app/domain/data/simple_submission_dto.py @@ -6,5 +6,8 @@ class SimpleSubmissionDTO(BaseModel): - timestamp: Optional[datetime] = Field(alias="timestamp") - score: Optional[float] = Field(alias="score") + timestamp: Optional[datetime] = Field(alias="timestamp", default=None) + score: Optional[float] = Field(alias="score", default=0) + + class Config: + require_by_default = False