server/hooks.py
branchstable
changeset 4119 85bb30fb6d9b
parent 4116 20b23af4e51e
child 4212 ab6573088b4a
--- a/server/hooks.py	Mon Dec 14 16:25:25 2009 +0100
+++ b/server/hooks.py	Mon Dec 14 17:54:45 2009 +0100
@@ -260,7 +260,7 @@
 def cstrcheck_after_update_attributes(session, entity):
     if session.is_super_session:
         return
-    schema = session.vreg.schema
+    eschema = entity.e_schema
     for attr in entity.edited_attributes:
         if eschema.subjrels[attr].final:
             constraints = [c for c in entity.e_schema.constraints(attr)