Skip to content

Commit

Permalink
Colocando melhorias relatadas no PR
Browse files Browse the repository at this point in the history
  • Loading branch information
ulyssesBML committed Jan 20, 2020
1 parent d3c5015 commit 8a3b295
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions sapl/painel/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ def get_materia_aberta(pk):


def get_presentes(pk, response, materia):
if type(materia) == OrdemDia:
if isinstance(materia, OrdemDia):
presentes = PresencaOrdemDia.objects.filter(
sessao_plenaria_id=pk)
else:
Expand All @@ -369,13 +369,15 @@ def get_presentes(pk, response, materia):
num_presentes = len(presentes)
data_sessao = sessao.data_inicio

if type(materia) is ExpedienteMateria:
if isinstance(materia, ExpedienteMateria):
oradores = OradorExpediente.objects.filter(
sessao_plenaria_id=pk).order_by('numero_ordem')
else:
elif isinstance(materia, OrdemDia):
oradores = OradorOrdemDia.objects.filter(
sessao_plenaria_id=pk).order_by('numero_ordem')

else:
oradores = []

oradores_list = []
for o in oradores:
oradores_list.append(
Expand Down

0 comments on commit 8a3b295

Please sign in to comment.