Skip to content

Commit

Permalink
nit: set size for aggregated query
Browse files Browse the repository at this point in the history
  • Loading branch information
zandre-eng committed Nov 26, 2024
1 parent eea21c5 commit 305d37e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions corehq/apps/hqadmin/reports.py
Original file line number Diff line number Diff line change
Expand Up @@ -405,13 +405,13 @@ def should_show_domain(self, domain, total_cases, total_forms):

@staticmethod
def _case_count_by_domain(domains):
return CaseES().domain(domains).aggregation(
return CaseES().domain(domains).size(0).aggregation(
TermsAggregation('domain', 'domain.exact')
).run().aggregations.domain.buckets_dict

@staticmethod
def _forms_count_by_domain(domains):
return FormES().domain(domains).aggregation(
return FormES().domain(domains).size(0).aggregation(
TermsAggregation('domain', 'domain.exact')
).run().aggregations.domain.buckets_dict

Expand Down

0 comments on commit 305d37e

Please sign in to comment.