Skip to content

Commit

Permalink
Merge pull request #4665 from kobotoolbox/remove-joins-daily-counters
Browse files Browse the repository at this point in the history
Improve `/api/v2/service_usage` endpoint response
  • Loading branch information
jnm authored Sep 26, 2023
2 parents c4cd7ad + 00da7df commit be4fd6c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions kpi/serializers/v2/service_usage.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,8 +212,10 @@ def _get_organization_details(self):
return

# If the user is in an organization, get all org users so we can query their total org usage
self._user_ids = User.objects.values_list('pk', flat=True).filter(
organizations_organization__id=organization_id
self._user_ids = list(
User.objects.values_list('pk', flat=True).filter(
organizations_organization__id=organization_id
)
)

# If they have a subscription, use its start date to calculate beginning of current month/year's usage
Expand Down

0 comments on commit be4fd6c

Please sign in to comment.