server/schemahooks.py
changeset 2680 66472d85d548
parent 2641 9c33d98a074e
child 2697 a0c4bc933a1b
--- a/server/schemahooks.py	Tue Aug 04 17:02:18 2009 +0200
+++ b/server/schemahooks.py	Tue Aug 04 17:11:50 2009 +0200
@@ -963,7 +963,7 @@
 def before_delete_constrained_by(session, fromeid, rtype, toeid):
     if not fromeid in session.transaction_data.get('pendingeids', ()):
         schema = session.schema
-        entity = session.eid_rset(toeid).get_entity(0, 0)
+        entity = session.entity_from_eid(toeid)
         subjtype, rtype, objtype = schema.schema_by_eid(fromeid)
         try:
             cstr = rtype.constraint_by_type(subjtype, objtype,