Browse Source

Merge pull request #485 from interlegis/475-choice-statustramitacaoadm

fix #475 Ajustar choice da migração de StatusTramitacaoAdministrativo
pull/438/head
Luciano Henrique Nunes de Almeida 9 years ago
parent
commit
edf55d8782
  1. 6
      legacy/migration.py

6
legacy/migration.py

@ -16,6 +16,7 @@ from comissoes.models import Composicao, Participacao
from materia.models import StatusTramitacao, Tramitacao from materia.models import StatusTramitacao, Tramitacao
from norma.models import NormaJuridica from norma.models import NormaJuridica
from parlamentares.models import Parlamentar from parlamentares.models import Parlamentar
from protocoloadm.models import StatusTramitacaoAdministrativo
from sessao.models import OrdemDia, SessaoPlenaria from sessao.models import OrdemDia, SessaoPlenaria
# BASE ###################################################################### # BASE ######################################################################
@ -417,6 +418,10 @@ def adjust_statustramitacao(new, old):
new.indicador = '' new.indicador = ''
def adjust_statustramitacaoadm(new, old):
adjust_statustramitacao(new, old)
def adjust_tramitacao(new, old): def adjust_tramitacao(new, old):
if old.sgl_turno == 'Ú': if old.sgl_turno == 'Ú':
new.turno = 'U' new.turno = 'U'
@ -433,6 +438,7 @@ MIGRATION_ADJUSTMENTS = {
Parlamentar: adjust_parlamentar, Parlamentar: adjust_parlamentar,
SessaoPlenaria: adjust_sessaoplenaria, SessaoPlenaria: adjust_sessaoplenaria,
StatusTramitacao: adjust_statustramitacao, StatusTramitacao: adjust_statustramitacao,
StatusTramitacaoAdministrativo: adjust_statustramitacaoadm,
Tramitacao: adjust_tramitacao, Tramitacao: adjust_tramitacao,
} }

Loading…
Cancel
Save