server/migractions.py
branchstable
changeset 6073 bf684f1022bf
parent 6042 df9cafb8062c
child 6074 f2580c7abc26
--- a/server/migractions.py	Fri Aug 06 17:34:24 2010 +0200
+++ b/server/migractions.py	Fri Aug 06 17:35:02 2010 +0200
@@ -911,10 +911,15 @@
             self.commit()
             gmap = self.group_mapping()
             cmap = self.cstrtype_mapping()
+            done = set()
             for rdef in rschema.rdefs.itervalues():
                 if not (reposchema.has_entity(rdef.subject)
                         and reposchema.has_entity(rdef.object)):
                     continue
+                # symmetric relations appears twice
+                if (rdef.subject, rdef.object) in done:
+                    continue
+                done.add( (rdef.subject, rdef.object) )
                 self._set_rdef_eid(rdef)
                 ss.execschemarql(execute, rdef,
                                  ss.rdef2rql(rdef, cmap, gmap))