From f0b9f099f4c98416ad49fd126ee99c218de777e0 Mon Sep 17 00:00:00 2001 From: Marcio Mazza Date: Thu, 13 Aug 2015 17:25:48 -0300 Subject: [PATCH] Add check for SessaoPlenaria migration --- legacy/migration.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/legacy/migration.py b/legacy/migration.py index cbe9081d2..e358f9675 100644 --- a/legacy/migration.py +++ b/legacy/migration.py @@ -11,6 +11,7 @@ from model_mommy import mommy from comissoes.models import Composicao, Participacao from parlamentares.models import Parlamentar +from sessao.models import SessaoPlenaria from sapl.utils import appconfs # BASE ###################################################################### @@ -260,9 +261,14 @@ def adjust_parlamentar(new_parlamentar, old): new_parlamentar.unidade_deliberativa = False +def adjust_sessaoplenaria(new, old): + assert not old.tip_expediente + + MIGRATION_ADJUSTMENTS = { Participacao: adjust_participacao, Parlamentar: adjust_parlamentar, + SessaoPlenaria: adjust_sessaoplenaria, } # CHECKS ####################################################################