Changeset 3935609


Ignore:
Timestamp:
Jun 3, 2013, 4:49:20 AM (12 years ago)
Author:
Alex Dehnert <adehnert@…>
Branches:
master, space-access, stable, stage
Children:
d3b0d83
Parents:
382a060
git-author:
Alex Dehnert <adehnert@…> (06/03/13 04:49:20)
git-committer:
Alex Dehnert <adehnert@…> (06/03/13 04:49:20)
Message:

Sort the officers of a group (partial ASA-#232)

In many cases where some_group.officers() is called, the results will be
displayed in a context where some sensible order is desirable. This causes
that function to automatically call .order_by to sort the results by role and
person.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • asadb/groups/models.py

    r26826c9 r3935609  
    9898            if as_of == "now": as_of = datetime.datetime.now()
    9999            office_holders = office_holders.filter(start_time__lte=as_of, end_time__gte=as_of)
     100        office_holders = office_holders.order_by('role', 'person')
    100101        return office_holders
    101102
Note: See TracChangeset for help on using the changeset viewer.