Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

sort candidates and incumbents for testability

  • Loading branch information...
commit 3e0cadeacb0dcabf9c640c90aeed9e013c661e5b 1 parent 6a2bc5e
pw@slinktopp authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 purplevoter/controllers/people.py
View
4 purplevoter/controllers/people.py
@@ -44,8 +44,8 @@ def _to_json(obj):
'election': obj.election.name,
'election_stagename': obj.election.stagename,
'election_date': obj.election.date,
- 'candidates': obj.candidates,
- 'incumbents': obj.incumbents,
+ 'candidates': sorted(obj.candidates, key=lambda x: x.fullname),
+ 'incumbents': sorted(obj.incumbents, key=lambda x: x.fullname),
}
return info
else:
Please sign in to comment.
Something went wrong with that request. Please try again.