Skip to content

Commit

Permalink
fix: summary stats should not be accessed thru phenopackets
Browse files Browse the repository at this point in the history
  • Loading branch information
davidlougheed committed Oct 29, 2024
1 parent 2123496 commit ca32349
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions chord_metadata_service/discovery/stats.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ async def individual_experiment_type_stats(
"""
return await bento_public_format_count_and_stats_list(
queryset
.values(label=F("phenopackets__biosamples__experiment__experiment_type"))
.annotate(value=Count("phenopackets__biosamples__experiment", distinct=True)),
.values(label=F("biosamples__experiment__experiment_type"))
.annotate(value=Count("biosamples__experiment", distinct=True)),
discovery,
field_permissions,
)
Expand All @@ -45,8 +45,8 @@ async def individual_biosample_tissue_stats(
"""
return await bento_public_format_count_and_stats_list(
queryset
.values(label=F("phenopackets__biosamples__sampled_tissue__label"))
.annotate(value=Count("phenopackets__biosamples", distinct=True)),
.values(label=F("biosamples__sampled_tissue__label"))
.annotate(value=Count("biosamples", distinct=True)),
discovery,
field_permissions,
)
Expand Down

0 comments on commit ca32349

Please sign in to comment.