From ba03c0b446223fd74ec58743d8e1069f654c9060 Mon Sep 17 00:00:00 2001 From: Christian Oertlin Date: Tue, 19 Mar 2024 15:20:40 +0100 Subject: [PATCH] fix dict --- .../services/analysis_service/analysis_service.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/genotype_api/services/analysis_service/analysis_service.py b/genotype_api/services/analysis_service/analysis_service.py index 93b5736..3a89daf 100644 --- a/genotype_api/services/analysis_service/analysis_service.py +++ b/genotype_api/services/analysis_service/analysis_service.py @@ -15,4 +15,13 @@ def __init__(self, session: Session): def get_analysis_with_genotype_response(self, analysis_id: int) -> AnalysisWithGenotypeResponse: analysis: Analysis = get_analysis_by_id(session=self.session, analysis_id=analysis_id) - return AnalysisWithGenotypeResponse(**analysis.dict()) + return AnalysisWithGenotypeResponse( + type=analysis.type, + source=analysis.source, + sex=analysis.sex, + created_at=analysis.created_at, + sample_id=analysis.sample_id, + plate_id=analysis.plate_id, + id=analysis.id, + genotypes=analysis.genotypes, + )