From e698c426dad10cdc450ff2c5d61c699696ffb53f Mon Sep 17 00:00:00 2001 From: Christian Oertlin Date: Fri, 5 Apr 2024 14:48:55 +0200 Subject: [PATCH] use validator --- genotype_api/dto/sample.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/genotype_api/dto/sample.py b/genotype_api/dto/sample.py index ef8f3a5..215a0e2 100644 --- a/genotype_api/dto/sample.py +++ b/genotype_api/dto/sample.py @@ -25,7 +25,7 @@ class SampleResponse(BaseModel): sex: Sexes | None = None created_at: datetime | None = datetime.now() analyses: list[AnalysisOnSample] | None = None - detail: SampleDetail | None = None + detail: SampleDetail | None @field_validator("detail") def get_detail(cls, value, values) -> SampleDetail | None: