server/schemahooks.py
branchstable
changeset 2213 713e220e7425
parent 2195 58bef4f707ce
child 2250 bc6fc4d6bcac
--- a/server/schemahooks.py	Wed Jul 01 11:33:18 2009 +0200
+++ b/server/schemahooks.py	Wed Jul 01 11:33:40 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)