From 250edb5e1f8a6612568c39d8852ed5ea7bc5073c Mon Sep 17 00:00:00 2001 From: David Lougheed Date: Mon, 9 Sep 2024 14:28:45 -0400 Subject: [PATCH] fix: summaries select_related --- chord_metadata_service/experiments/summaries.py | 2 +- chord_metadata_service/phenopackets/summaries.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/chord_metadata_service/experiments/summaries.py b/chord_metadata_service/experiments/summaries.py index a1a40627d..2ab1b6173 100644 --- a/chord_metadata_service/experiments/summaries.py +++ b/chord_metadata_service/experiments/summaries.py @@ -115,7 +115,7 @@ async def dt_experiment_summary( experiments = experiments.filter(dataset_id=dataset_id) elif project_id := scope.project_id: # Project is set but dataset isn't - experiments = experiments.select_related("project").filter(dataset__project_id=project_id) + experiments = experiments.select_related("dataset").filter(dataset__project_id=project_id) # Parallel-gather all statistics we may need for this response ( diff --git a/chord_metadata_service/phenopackets/summaries.py b/chord_metadata_service/phenopackets/summaries.py index 15ba46dae..98a478abc 100644 --- a/chord_metadata_service/phenopackets/summaries.py +++ b/chord_metadata_service/phenopackets/summaries.py @@ -93,7 +93,7 @@ async def dt_phenopacket_summary( phenopackets = phenopackets.filter(dataset_id=dataset_id) elif project_id := scope.project_id: # Project is set but dataset isn't - phenopackets = phenopackets.select_related("project").filter(dataset__project_id=project_id) + phenopackets = phenopackets.select_related("dataset").filter(dataset__project_id=project_id) # Parallel-gather all statistics we may need for this response (