Changeset 0e6090f for asadb/forms


Ignore:
Timestamp:
Sep 21, 2011, 2:07:49 AM (14 years ago)
Author:
Alex Dehnert <adehnert@…>
Branches:
master, space-access, stable, stage, test-hooks
Children:
8d43bd4
Parents:
f48884a
git-author:
Alex Dehnert <adehnert@…> (09/21/11 02:07:49)
git-committer:
Alex Dehnert <adehnert@…> (09/21/11 02:07:49)
Message:

Don't count one person confirming several times

File:
1 edited

Legend:

Unmodified
Added
Removed
  • asadb/forms/views.py

    rea42397 r0e6090f  
    366366    def get_queryset(self):
    367367        group_updates = forms.models.GroupMembershipUpdate.objects.all()
    368         group_updates = group_updates.annotate(num_confirms=Count('group__personmembershipupdate'))
     368        group_updates = group_updates.annotate(num_confirms=Count('group__personmembershipupdate__username', distinct=True))
    369369        return group_updates
    370370
Note: See TracChangeset for help on using the changeset viewer.