From 9b106634dd396fd917189efa0796b4a2597fc5ef Mon Sep 17 00:00:00 2001 From: ahdamin Date: Fri, 13 Dec 2024 15:09:17 +0100 Subject: [PATCH] Revert to previous --- genotype_api/database/crud/read.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/genotype_api/database/crud/read.py b/genotype_api/database/crud/read.py index 518e69f..ef2c9de 100644 --- a/genotype_api/database/crud/read.py +++ b/genotype_api/database/crud/read.py @@ -247,11 +247,7 @@ def _get_samples_with_analyses_and_genotypes() -> Query: return ( select(Sample) .distinct() - .options( - selectinload(Sample.analyses) - .selectinload(Analysis.genotypes) - .selectinload(Genotype.analysis) - ) + .options(selectinload(Sample.analyses).selectinload(Analysis.genotypes)) .join(Analysis, Analysis.sample_id == Sample.id) )