Browse Source

Fix #2629 (#2644)

* Fix #2629

* Faz modificações pedidas

* Corrige bug
pull/2655/head
Victor Fabre 6 years ago
committed by Edward
parent
commit
ee2cbdfd9c
  1. 7
      sapl/base/views.py

7
sapl/base/views.py

@ -611,12 +611,13 @@ class RelatorioMateriasTramitacaoView(FilterView):
qs = filtra_url_materias_em_tramitacao(
qr, qs, 'tramitacao__status', 'status')
context['object_list'] = qs
li = [li1 for li1 in qs if li1.tramitacao_set.last() and li1.tramitacao_set.last().status.indicador != 'F']
context['object_list'] = li
qtdes = {}
for tipo in TipoMateriaLegislativa.objects.all():
qs = context['object_list']
qtde = len(qs.filter(tipo_id=tipo.id))
li = context['object_list']
qtde = sum(1 for i in li if i.tipo_id==tipo.id)
if qtde > 0:
qtdes[tipo] = qtde
context['qtdes'] = qtdes

Loading…
Cancel
Save