Sort the primary document on a ballot set to the top.

- Legacy-Id: 379
This commit is contained in:
Bill Fenner 2007-06-13 18:35:11 +00:00
parent 33794966e3
commit 62b82e5ed1

View file

@ -61,7 +61,7 @@ def search(request):
if status != '':
q_objs.append(Q(draft__status=status,rfc_flag=0))
matches = IDInternal.objects.all().filter(*q_objs)
matches = matches.order_by('cur_state', 'cur_sub_state', 'ballot')
matches = matches.order_by('cur_state', 'cur_sub_state', 'ballot', '-primary_flag')
#
# Now search by I-D exists, if there could be any results.
# If searching by job owner, current state or substate, there