server/migractions.py
branchstable
changeset 8209 67660d5f1916
parent 8049 a48301a44b50
child 8216 99ff746e8de8
child 8232 8c29253105ba
--- a/server/migractions.py	Fri Feb 10 10:36:40 2012 +0100
+++ b/server/migractions.py	Thu Feb 09 09:52:02 2012 +0100
@@ -1022,15 +1022,15 @@
 
         """
         reposchema = self.repo.schema
+        rschema = self.fs_schema.rschema(rtype)
+        execute = self._cw.execute
         if rtype in reposchema:
             print 'warning: relation type %s is already known, skip addition' % (
                 rtype)
-            return
-        rschema = self.fs_schema.rschema(rtype)
-        execute = self._cw.execute
-        # register the relation into CWRType and insert necessary relation
-        # definitions
-        ss.execschemarql(execute, rschema, ss.rschema2rql(rschema, addrdef=False))
+        else:
+            # register the relation into CWRType and insert necessary relation
+            # definitions
+            ss.execschemarql(execute, rschema, ss.rschema2rql(rschema, addrdef=False))
         if addrdef:
             self.commit()
             gmap = self.group_mapping()