From 75ced3afbbfd6ee0b47282dcc033f8a259f6b499 Mon Sep 17 00:00:00 2001 From: Marcio Mazza Date: Wed, 7 Mar 2018 17:38:49 -0300 Subject: [PATCH] =?UTF-8?q?Melhora=20feedback=20de=20ajuste=20de=20composi?= =?UTF-8?q?=C3=A7=C3=A3o=20de=20comiss=C3=A3o?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sapl/legacy/migracao_dados.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sapl/legacy/migracao_dados.py b/sapl/legacy/migracao_dados.py index ffde783aa..7cb2484ca 100644 --- a/sapl/legacy/migracao_dados.py +++ b/sapl/legacy/migracao_dados.py @@ -947,7 +947,11 @@ def adjust_parlamentar(new, old): def adjust_participacao(new, old): composicao = Composicao() composicao.comissao_id, composicao.periodo_id = [ - get_fk_related(Composicao._meta.get_field(name), value) + get_fk_related(Composicao._meta.get_field(name), + value, + 'composicao_comissao.cod_comp_comissao = {}'.format( + old.pk + )) for name, value in (('comissao', old.cod_comissao), ('periodo', old.cod_periodo_comp))] # check if there is already an "equal" one in the db