server/securityhooks.py
changeset 2647 b0a2e779845c
parent 1977 606923dff11b
child 2920 64322aa83a1d
--- a/server/securityhooks.py	Sun Aug 02 11:58:55 2009 +0200
+++ b/server/securityhooks.py	Sun Aug 02 12:00:17 2009 +0200
@@ -18,7 +18,11 @@
     # ._default_set is only there on entity creation to indicate unspecified
     # attributes which has been set to a default value defined in the schema
     defaults = getattr(entity, '_default_set', ())
-    for attr in entity.keys():
+    try:
+        editedattrs = entity.edited_attributes
+    except AttributeError:
+        editedattrs = entity.keys()
+    for attr in editedattrs:
         if attr in defaults:
             continue
         rschema = eschema.subject_relation(attr)