Skip to content

Commit

Permalink
force detail
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrOertlin committed Apr 5, 2024
1 parent 80e20be commit 7bc51b3
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions genotype_api/dto/sample.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,9 @@ class SampleResponse(BaseModel):
sex: Sexes | None = None
created_at: datetime | None = datetime.now()
analyses: list[AnalysisOnSample] | None = None
detail: SampleDetail | None
detail: SampleDetail = None

@field_validator("detail")
@classmethod
def get_detail(cls, value, values) -> SampleDetail | None:
analyses = values.get("analyses")
if analyses:
Expand Down

0 comments on commit 7bc51b3

Please sign in to comment.