Skip to content

Commit

Permalink
count_threshold conf to resp in public_overview
Browse files Browse the repository at this point in the history
  • Loading branch information
noctillion committed Jun 12, 2023
1 parent e136a7c commit fd2ee37
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 fd2ee37

Please sign in to comment.