server/migractions.py
changeset 7166 dde161937d3e
parent 7161 e3f69df8dac7
child 7295 b6fd14ee491e
--- a/server/migractions.py	Fri Apr 01 14:38:16 2011 +0200
+++ b/server/migractions.py	Fri Apr 01 15:04:47 2011 +0200
@@ -758,9 +758,9 @@
         targeted type is known
         """
         instschema = self.repo.schema
-        assert not etype in instschema, \
+        eschema = self.fs_schema.eschema(etype)
+        assert eschema.final or not etype in instschema, \
                '%s already defined in the instance schema' % etype
-        eschema = self.fs_schema.eschema(etype)
         confirm = self.verbosity >= 2
         groupmap = self.group_mapping()
         cstrtypemap = self.cstrtype_mapping()