From 2a7d7ae1ded183f6280c2ef4db08a501b285800c Mon Sep 17 00:00:00 2001 From: VictorFabreF Date: Fri, 18 May 2018 09:20:14 -0300 Subject: [PATCH] Fix #1935 --- sapl/parlamentares/forms.py | 2 +- sapl/sessao/forms.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/sapl/parlamentares/forms.py b/sapl/parlamentares/forms.py index e5b8d7d58..a7e042037 100644 --- a/sapl/parlamentares/forms.py +++ b/sapl/parlamentares/forms.py @@ -321,7 +321,7 @@ class FrenteForm(ModelForm): frente = super(FrenteForm, self).save(commit) content_type = ContentType.objects.get_for_model(Frente) object_id = frente.pk - tipo = TipoAutor.objects.get(descricao='Frente Parlamentar') + tipo = TipoAutor.objects.get(descricao__icontains='Frente') Autor.objects.create( content_type=content_type, object_id=object_id, diff --git a/sapl/sessao/forms.py b/sapl/sessao/forms.py index c35abf306..cd46fab84 100644 --- a/sapl/sessao/forms.py +++ b/sapl/sessao/forms.py @@ -124,7 +124,7 @@ class BancadaForm(ModelForm): bancada = super(BancadaForm, self).save(commit) content_type = ContentType.objects.get_for_model(Bancada) object_id = bancada.pk - tipo = TipoAutor.objects.get(descricao='Bancada Parlamentar') + tipo = TipoAutor.objects.get(descricao__icontains='Bancada') Autor.objects.create( content_type=content_type, object_id=object_id, @@ -159,7 +159,7 @@ class BlocoForm(ModelForm): bloco = super(BlocoForm, self).save(commit) content_type = ContentType.objects.get_for_model(Bloco) object_id = bloco.pk - tipo = TipoAutor.objects.get(descricao='Bloco Parlamentar') + tipo = TipoAutor.objects.get(descricao__icontains='Bloco') Autor.objects.create( content_type=content_type, object_id=object_id,