Ignore:
Timestamp:
Nov 29, 2013, 12:18:04 AM (12 years ago)
Author:
Alex Dehnert <adehnert@…>
Branches:
master, stable, stage
Children:
8a6faa1
Parents:
08b7660
git-author:
Alex Dehnert <adehnert@…> (11/29/13 00:18:04)
git-committer:
Alex Dehnert <adehnert@…> (11/29/13 00:18:04)
Message:

Include suspended groups in issues.csv (ASA-#195)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • asadb/forms/views.py

    r08b7660 ra526ed2  
    513513    account_numbers = ("accounts" in request.GET) and request.GET['accounts'] == "1"
    514514
    515     active_groups = groups.models.Group.active_groups
     515    check_groups = groups.models.Group.objects.filter(group_status__slug__in=('active', 'suspended', ))
     516    check_groups = check_groups.select_related('group_status__slug')
    516517    group_updates = forms.models.GroupMembershipUpdate.objects.filter(cycle__slug=slug, )
    517518    people_confirmations = forms.models.PersonMembershipUpdate.objects.filter(
     
    523524    buf = StringIO.StringIO()
    524525    output = csv.writer(buf)
    525     fields = ['group_id', 'group_name', 'issue', 'num_confirm', 'officer_email', ]
     526    fields = ['group_id', 'group_name', 'group_status', 'issue', 'num_confirm', 'officer_email', ]
    526527    if account_numbers: fields.append("main_account")
    527528    output.writerow(fields)
     
    531532            group.id,
    532533            group.name,
     534            group.group_status.slug,
    533535            issue,
    534536            num_confirms,
     
    539541
    540542    q_present = Q(id__in=group_updates.values('group'))
    541     missing_groups = active_groups.filter(~q_present)
     543    missing_groups = check_groups.filter(~q_present)
    542544    #print len(list(group_updates))
    543545    for group in missing_groups:
Note: See TracChangeset for help on using the changeset viewer.