Browse Source

Revert "Fixes #1898"

This reverts commit 2806bf4d9b.
pull/1914/head
Edward Ribeiro 7 years ago
parent
commit
1dfcd54627
  1. 9
      sapl/sessao/views.py

9
sapl/sessao/views.py

@ -6,7 +6,7 @@ from django.contrib.auth.decorators import permission_required
from django.contrib.auth.mixins import PermissionRequiredMixin from django.contrib.auth.mixins import PermissionRequiredMixin
from django.core.exceptions import MultipleObjectsReturned, ObjectDoesNotExist from django.core.exceptions import MultipleObjectsReturned, ObjectDoesNotExist
from django.core.urlresolvers import reverse from django.core.urlresolvers import reverse
from django.db.models import Max, Q, Func from django.db.models import Max, Q
from django.forms.utils import ErrorList from django.forms.utils import ErrorList
from django.http import JsonResponse from django.http import JsonResponse
from django.http.response import Http404, HttpResponseRedirect from django.http.response import Http404, HttpResponseRedirect
@ -393,13 +393,8 @@ def get_presencas_generic(model, sessao, legislatura):
presentes = [p.parlamentar for p in presencas] presentes = [p.parlamentar for p in presencas]
# COLLATION pt_BR.utf8
nome_c = Func(
'parlamentar__nome_parlamentar',
function='pt_BR.utf8',
template='(%(expressions)s) COLLATE "%(function)s"')
mandato = Mandato.objects.filter( mandato = Mandato.objects.filter(
legislatura=legislatura).order_by(nome_c.asc()) legislatura=legislatura).order_by('parlamentar__nome_parlamentar')
for m in mandato: for m in mandato:
if m.parlamentar in presentes: if m.parlamentar in presentes:

Loading…
Cancel
Save