changeset 4:17d65cd9f9e7 default tip

Use parent_code to retrieve the parent instead of party_code
author Cédric Krier <ced@b2ck.com>
date Wed, 21 Jun 2017 16:33:28 +0200
parents e1d3f7a0a7d9
children
files migration.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/migration.py	Wed Jun 21 16:31:58 2017 +0200
+++ b/migration.py	Wed Jun 21 16:33:28 2017 +0200
@@ -242,7 +242,7 @@
         to_save = []
         for party_code, parent_code in parents.iteritems():
             party = code2party[party_code]
-            parent = code2party[party_code]
+            parent = code2party[parent_code]
             parent.relations.new(to=party, type=parent_of)
             to_save.append(parent)
         Party.save(to_save)