From 7ed7d21c3861810f94d63f8b0fc6183b44fcf9e8 Mon Sep 17 00:00:00 2001 From: Benjamin Dauvergne Date: Sun, 23 Jun 2019 00:35:53 +0200 Subject: [PATCH] nanterre: create relation to new adresse (#34239) --- zoo/zoo_nanterre/utils.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/zoo/zoo_nanterre/utils.py b/zoo/zoo_nanterre/utils.py index 65c0977..a0bfff2 100644 --- a/zoo/zoo_nanterre/utils.py +++ b/zoo/zoo_nanterre/utils.py @@ -1359,7 +1359,7 @@ def passage_a_la_majorite(): "streetnumberext": "", "streetmatriculation": "" }) - new_adresse_rel = Relation( + new_adresse_rel = Relation.objects.create( created=transaction, left=individu, right=new_adresse, @@ -1367,7 +1367,8 @@ def passage_a_la_majorite(): content={ 'principale': False, }) - assert len(adresses(individu)) == 1 + adrs = adresses(individu) + assert len(adrs) == 1, '%s has %d adresses' % (individu, len(adrs)) # launch messages to applications fragments.PassageALaMajorite.pour_chaque_application(individu, relations_parentales) -- 2.20.1