Skip to content

Commit be4fd6c

Browse files
authored
Merge pull request #4665 from kobotoolbox/remove-joins-daily-counters
Improve `/api/v2/service_usage` endpoint response
2 parents c4cd7ad + 00da7df commit be4fd6c

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

kpi/serializers/v2/service_usage.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -212,8 +212,10 @@ def _get_organization_details(self):
212212
return
213213

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

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

0 commit comments

Comments
 (0)