Browse Source

Fix #1410

pull/1416/head
Mariana Mendes 7 years ago
parent
commit
114d24c53b
  1. 1
      sapl/api/serializers.py
  2. 2
      sapl/api/views.py
  3. 1
      sapl/compilacao/views.py
  4. 3
      sapl/materia/apps.py
  5. 2
      sapl/materia/signals.py
  6. 2
      sapl/materia/views.py
  7. 7
      sapl/protocoloadm/views.py
  8. 2
      sapl/sessao/views.py

1
sapl/api/serializers.py

@ -110,7 +110,6 @@ class SessaoPlenariaSerializer(serializers.ModelSerializer):
def __init__(self, *args, **kwargs):
super(SessaoPlenariaSerializer, self).__init__(args, kwargs)
casa = CasaLegislativa.objects.first()
def get_pk_sessao(self, obj):
return obj.pk

2
sapl/api/views.py

@ -173,8 +173,6 @@ class AutoresProvaveisListView(ListAPIView):
serializer_class = ChoiceSerializer
def get_queryset(self):
queryset = ListAPIView.get_queryset(self)
params = {'content_type__isnull': False}
tipo = ''

1
sapl/compilacao/views.py

@ -142,7 +142,6 @@ class IntegracaoTaView(TemplateView):
implemente, ou passe `None` para as chaves que são fixas.
""")
map_fields = self.map_fields
ta_values = getattr(self, 'ta_values', {})
item = get_object_or_404(self.model, pk=kwargs['pk'])

3
sapl/materia/apps.py

@ -6,6 +6,3 @@ class AppConfig(apps.AppConfig):
name = 'sapl.materia'
label = 'materia'
verbose_name = _('Matéria')
def ready(self):
from . import signals

2
sapl/materia/signals.py

@ -1,6 +1,4 @@
import django.dispatch
from django.db.models.signals import post_delete, post_save
from .models import DocumentoAcessorio, MateriaLegislativa
tramitacao_signal = django.dispatch.Signal(providing_args=['post', 'request'])

2
sapl/materia/views.py

@ -1,4 +1,4 @@
from datetime import date, datetime
from datetime import datetime
from random import choice
from string import ascii_letters, digits

7
sapl/protocoloadm/views.py

@ -10,7 +10,7 @@ from django.db.models import Max, Q
from django.http import Http404, HttpResponse, JsonResponse
from django.shortcuts import redirect
from django.utils.translation import ugettext_lazy as _
from django.views.generic import CreateView, DetailView, ListView
from django.views.generic import CreateView, ListView
from django.views.generic.base import TemplateView
from django_filters.views import FilterView
@ -29,7 +29,7 @@ from .forms import (AnularProcoloAdmForm, DocumentoAcessorioAdministrativoForm,
ProtocoloFilterSet, ProtocoloMateriaForm,
TramitacaoAdmEditForm, TramitacaoAdmForm)
from .models import (DocumentoAcessorioAdministrativo, DocumentoAdministrativo,
Protocolo, StatusTramitacaoAdministrativo,
StatusTramitacaoAdministrativo,
TipoDocumentoAdministrativo, TramitacaoAdministrativo)
TipoDocumentoAdministrativoCrud = CrudAux.build(
@ -470,7 +470,8 @@ class ProtocoloMateriaView(PermissionRequiredMixin, CreateView):
autor_parlamentar = Autor.objects.filter(
content_type=model_parlamentar, object_id__in=lista_parlamentares)
lista_comissoes = Comissao.objects.filter(Q(data_extincao__isnull=True) | Q(
lista_comissoes = Comissao.objects.filter(Q(
data_extincao__isnull=True) | Q(
data_extincao__gt=date.today())).values_list('id', flat=True)
model_comissao = ContentType.objects.get_for_model(Comissao)
autor_comissoes = Autor.objects.filter(

2
sapl/sessao/views.py

@ -728,8 +728,6 @@ class PresencaOrdemDiaView(FormMixin, PresencaMixin, DetailView):
self.object = self.get_object()
form = self.get_form()
pk = kwargs['pk']
if form.is_valid():
# Pegar os presentes salvos no banco
presentes_banco = PresencaOrdemDia.objects.filter(

Loading…
Cancel
Save