server/schemahooks.py
branchstable
changeset 2195 58bef4f707ce
parent 2101 08003e0354a7
child 2250 bc6fc4d6bcac
--- a/server/schemahooks.py	Mon Jun 29 16:18:07 2009 +0200
+++ b/server/schemahooks.py	Mon Jun 29 17:02:51 2009 +0200
@@ -38,7 +38,7 @@
 def get_constraints(session, entity):
     constraints = []
     for cstreid in session.transaction_data.get(entity.eid, ()):
-        cstrent = session.entity(cstreid)
+        cstrent = session.entity_from_eid(cstreid)
         cstr = CONSTRAINTS[cstrent.type].deserialize(cstrent.value)
         cstr.eid = cstreid
         constraints.append(cstr)