Browse Source

Merge pull request #1937 from interlegis/1935-muda-como-adquirir-tipo-autor

Fix #1935
pull/1945/head
Talitha Pumar 7 years ago
committed by GitHub
parent
commit
f810df3c60
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      sapl/parlamentares/forms.py
  2. 4
      sapl/sessao/forms.py

2
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,

4
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,

Loading…
Cancel
Save