Skip to content

Commit

Permalink
Merge pull request #412 from bento-platform:features/count-threshold-…
Browse files Browse the repository at this point in the history
…config-discoverable-public

count_threshold conf to resp in public_overview
  • Loading branch information
noctillion committed Jun 12, 2023
2 parents e136a7c + fd2ee37 commit 541ba62
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion chord_metadata_service/restapi/api_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -359,6 +359,9 @@ def public_overview(_request):
if individuals_count < settings.CONFIG_PUBLIC["rules"]["count_threshold"]:
return Response(settings.INSUFFICIENT_DATA_AVAILABLE)

# Get the rules config
rules_config = settings.CONFIG_PUBLIC["rules"]

response = {
"layout": settings.CONFIG_PUBLIC["overview"],
"fields": {},
Expand All @@ -367,7 +370,8 @@ def public_overview(_request):
"biosamples": biosamples_count,
"experiments": experiments_count
},
"max_query_parameters": settings.CONFIG_PUBLIC["rules"]["max_query_parameters"],
"max_query_parameters": rules_config["max_query_parameters"],
"count_threshold": rules_config["count_threshold"],
}

# Parse the public config to gather data for each field defined in the
Expand Down

0 comments on commit 541ba62

Please sign in to comment.