From 6a4f8422bb1f98b4470d10adca2c49afc15a26da Mon Sep 17 00:00:00 2001 From: joaohortsenado <100957576+joaohortsenado@users.noreply.github.com> Date: Sat, 28 Oct 2023 19:23:35 -0300 Subject: [PATCH] feat: adiciona check de presenca e sessao aberta na leitura em bloco da ordem do dia (#3686) feat: adiciona check de presenca e sessao aberta na leitura em bloca da ordem do dia Co-authored-by: joao --- sapl/sessao/views.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sapl/sessao/views.py b/sapl/sessao/views.py index 104d26d6b..e19cfc267 100755 --- a/sapl/sessao/views.py +++ b/sapl/sessao/views.py @@ -4425,8 +4425,14 @@ class LeituraEmBloco(PermissionRequiredForAppCrudMixin, ListView): selectedlist = request.POST.getlist('marcadas_4') if request.POST['origem'] == 'ordem': models = OrdemDia.objects.filter(id__in=selectedlist) + presenca_model = PresencaOrdemDia elif request.POST['origem'] == 'expediente': models = ExpedienteMateria.objects.filter(id__in=selectedlist) + presenca_model = SessaoPlenariaPresenca + + if (not verifica_presenca(request, presenca_model, self.kwargs['pk'], True) or + not verifica_sessao_iniciada(request, self.kwargs['pk'], True)): + return self.get(request, self.kwargs) if not models: messages.add_message(self.request, messages.ERROR,