From 1b19781012009735fe49c1e957813c90703155a9 Mon Sep 17 00:00:00 2001 From: Luciano Almeida Date: Tue, 25 Jul 2017 15:58:18 -0300 Subject: [PATCH] Arruma a data_fim_mandato Signed-off-by: Luciano Almeida --- sapl/legacy/migration.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sapl/legacy/migration.py b/sapl/legacy/migration.py index 8f56f91f1..fc22cf6d4 100644 --- a/sapl/legacy/migration.py +++ b/sapl/legacy/migration.py @@ -661,6 +661,8 @@ def adjust_documentoadministrativo(new, old): def adjust_mandato(new, old): + if old.dat_fim_mandato: + new.data_fim_mandato = old.dat_fim_mandato if not new.data_fim_mandato: legislatura = Legislatura.objects.latest('data_fim') new.data_fim_mandato = legislatura.data_fim