hooks/notification.py
branchstable
changeset 4993 c9229f185690
parent 4843 5f7363416765
child 5174 78438ad513ca
child 5421 8167de96c523
--- a/hooks/notification.py	Wed Mar 24 14:11:01 2010 +0100
+++ b/hooks/notification.py	Wed Mar 24 14:12:47 2010 +0100
@@ -112,12 +112,12 @@
         if session.added_in_transaction(self.entity.eid):
             return # entity is being created
         # then compute changes
-        changes = session.transaction_data.setdefault('changes', {})
-        thisentitychanges = changes.setdefault(self.entity.eid, set())
         attrs = [k for k in self.entity.edited_attributes
                  if not k in self.skip_attrs]
         if not attrs:
             return
+        changes = session.transaction_data.setdefault('changes', {})
+        thisentitychanges = changes.setdefault(self.entity.eid, set())
         rqlsel, rqlrestr = [], ['X eid %(x)s']
         for i, attr in enumerate(attrs):
             var = chr(65+i)