Skip to content

Commit

Permalink
fixes for katsu private overview changes
Browse files Browse the repository at this point in the history
  • Loading branch information
gsfk committed Oct 3, 2024
1 parent 0ec58be commit 6b5d553
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions bento_beacon/network/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,15 @@ def info_for_host_beacon():
# TODO: fix ugly overlapping overview functions
# requires rolling out changes to all beacons first
bento_overview = overview()
biosample_and_experiment_stats = overview_statistics()
bento_private_overview = overview_statistics()
experiment_stats = {"count": bento_private_overview.get("count", 0)}
biosample_stats = {
"count": bento_private_overview.get("phenopacket", {})
.get("data_type_specific", {})
.get("biosamples", {})
.get("count", 0)
}

api_url = current_app.config["BEACON_BASE_URL"]

return {
Expand All @@ -50,7 +58,8 @@ def info_for_host_beacon():
"overview": {
"individuals": {"count": bento_overview.get("counts", {}).get("individuals")},
"variants": bento_overview.get("counts", {}).get("variants", {}),
**biosample_and_experiment_stats,
"biosamples": biosample_stats,
"experiments": experiment_stats,
},
"querySections": get_katsu_config_search_fields(requires_auth="none").get("sections", []),
}
Expand Down

0 comments on commit 6b5d553

Please sign in to comment.