Browse Source

Fix #662

pull/675/head
Eduardo Edson Batista Cordeiro Alves 8 years ago
parent
commit
e4c3ce032d
  1. 6
      sapl/materia/forms.py

6
sapl/materia/forms.py

@ -17,6 +17,7 @@ from sapl.comissoes.models import Comissao
from sapl.crispy_layout_mixin import form_actions, to_row
from sapl.norma.models import (LegislacaoCitada, NormaJuridica,
TipoNormaJuridica)
from sapl.parlamentares.models import Parlamentar
from sapl.settings import MAX_DOC_UPLOAD_SIZE
from sapl.utils import (RANGE_ANOS, RangeWidgetOverride, autor_label,
autor_modal)
@ -190,6 +191,11 @@ class RelatoriaForm(ModelForm):
widgets = {'comissao': forms.Select(attrs={'disabled': 'disabled'})}
def __init__(self, *args, **kwargs):
super(RelatoriaForm, self).__init__(*args, **kwargs)
self.fields['parlamentar'].queryset = Parlamentar.objects.filter(
ativo=True).order_by('nome_completo')
def clean(self):
cleaned_data = self.cleaned_data

Loading…
Cancel
Save