diff --git a/sapl/materia/forms.py b/sapl/materia/forms.py index 84a60dcb6..258765a2a 100644 --- a/sapl/materia/forms.py +++ b/sapl/materia/forms.py @@ -174,7 +174,9 @@ class RelatoriaForm(ModelForm): def __init__(self, *args, **kwargs): super(RelatoriaForm, self).__init__(*args, **kwargs) self.fields['parlamentar'].queryset = Parlamentar.objects.filter( - ativo=True).order_by('nome_completo') + ativo=True, id__in=Participacao.objects.filter( + composicao_id=self.initial['comissao'] + ).values_list('parlamentar_id')).order_by('nome_completo') def clean(self): cleaned_data = self.cleaned_data