diff --git a/sapl/parlamentares/models.py b/sapl/parlamentares/models.py index 63177a734..1a4e29ac6 100644 --- a/sapl/parlamentares/models.py +++ b/sapl/parlamentares/models.py @@ -8,7 +8,8 @@ from model_utils import Choices from sapl.base.models import Autor from sapl.utils import (INDICADOR_AFASTAMENTO, UF, YES_NO_CHOICES, SaplGenericRelation, intervalos_tem_intersecao, - restringe_tipos_de_arquivo_img) + restringe_tipos_de_arquivo_img, + get_settings_auth_user_model) class Legislatura(models.Model): @@ -501,7 +502,9 @@ class Frente(models.Model): class Votante(models.Model): parlamentar = models.ForeignKey( Parlamentar, verbose_name=_('Parlamentar'), related_name='parlamentar') - user = models.ForeignKey(User, verbose_name=_('User'), related_name='user') + user = models.ForeignKey( + get_settings_auth_user_model(), + verbose_name=_('User'), related_name='user') data = models.DateTimeField( verbose_name=_('Data'), auto_now_add=True, max_length=30, null=True, blank=True) diff --git a/sapl/sessao/models.py b/sapl/sessao/models.py index 369b5a0e2..9a5aae5cc 100644 --- a/sapl/sessao/models.py +++ b/sapl/sessao/models.py @@ -8,7 +8,8 @@ from sapl.materia.models import MateriaLegislativa from sapl.parlamentares.models import (CargoMesa, Legislatura, Parlamentar, Partido, SessaoLegislativa) from sapl.utils import (YES_NO_CHOICES, SaplGenericRelation, - restringe_tipos_de_arquivo_txt, texto_upload_path) + restringe_tipos_de_arquivo_txt, texto_upload_path, + get_settings_auth_user_model) class CargoBancada(models.Model): @@ -385,7 +386,7 @@ class VotoNominal(models.Model): sessao = models.ForeignKey(SessaoPlenaria) materia = models.ForeignKey(MateriaLegislativa) - user = models.ForeignKey(User) + user = models.ForeignKey(get_settings_auth_user_model()) ip = models.CharField(verbose_name=_('IP'), max_length=30) data_hora = models.DateTimeField( verbose_name=_('Data/Hora'), auto_now_add=True)