Skip to content
This repository has been archived by the owner on Feb 1, 2024. It is now read-only.

Commit

Permalink
fixup! Only count contributors with active public items for type count
Browse files Browse the repository at this point in the history
  • Loading branch information
jwalgran committed Mar 23, 2020
1 parent ad4e564 commit 9a51907
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/django/api/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,8 @@ def all_contributor_types(request):
"""
active_contrib_ids = Source.objects.filter(
is_active=True, is_public=True,
facilitylistitem__status__in=FacilityListItem.COMPLETE_STATUSES).values('contributor_id')
facilitylistitem__status__in=FacilityListItem.COMPLETE_STATUSES
).values('contributor_id')
counts = Contributor.objects.filter(id__in=active_contrib_ids).values(
'contrib_type').annotate(num_type=Count('contrib_type'))

Expand Down

0 comments on commit 9a51907

Please sign in to comment.