server/schemahooks.py
branchstable
changeset 3531 c095f5f54873
parent 3526 dfb2ebb765e2
child 3543 ed152fe5aa8b
--- a/server/schemahooks.py	Wed Sep 30 16:23:12 2009 +0200
+++ b/server/schemahooks.py	Wed Sep 30 16:34:43 2009 +0200
@@ -345,8 +345,11 @@
                 self.error('error while creating index for %s.%s: %s',
                            table, column, ex)
         # final relations are not infered, propagate
+        try:
+            eschema = self.schema.eschema(rdef.subject)
+        except KeyError:
+            return # entity type currently being added
         rschema = self.schema.rschema(rdef.name)
-        eschema = self.schema.eschema(rdef.subject)
         props.update({'constraints': rdef.constraints,
                       'description': rdef.description,
                       'cardinality': rdef.cardinality,