Changeset 8481152 for asadb


Ignore:
Timestamp:
Jan 15, 2012, 8:01:27 AM (14 years ago)
Author:
Alex Dehnert <adehnert@…>
Branches:
master, space-access, stable, stage
Children:
0c4be73
Parents:
621bfd2
git-author:
Alex Dehnert <adehnert@…> (01/12/12 23:13:28)
git-committer:
Alex Dehnert <adehnert@…> (01/15/12 08:01:27)
Message:

Default to searching only active groups

File:
1 edited

Legend:

Unmodified
Added
Removed
  • asadb/groups/views.py

    rd7dcfee r8481152  
    549549            'group_funding',
    550550        ]
     551
     552    def __init__(self, data=None, *args, **kwargs):
     553        if data is None: data = {}
     554        else: data = data.copy()
     555        active_pk = groups.models.GroupStatus.objects.get(slug='active').pk
     556        data.setdefault('group_status', active_pk, )
     557        super(GroupFilter, self).__init__(data, *args, **kwargs)
    551558
    552559
Note: See TracChangeset for help on using the changeset viewer.