server/schemahooks.py
changeset 2740 7ab70fad02df
parent 2697 a0c4bc933a1b
child 2745 0dafa29ace1f
--- a/server/schemahooks.py	Fri Aug 07 16:18:51 2009 +0200
+++ b/server/schemahooks.py	Fri Aug 07 16:49:20 2009 +0200
@@ -920,6 +920,8 @@
 
 
 def after_update_erdef(session, entity):
+    if entity.eid in session.transaction_data.get('pendingeids', ()):
+        return
     desttype = entity.otype.name
     rschema = session.schema[entity.rtype.name]
     newvalues = {}
@@ -928,7 +930,7 @@
             continue
         if prop == 'order':
             prop = 'ordernum'
-        if prop in entity:
+        if prop in entity.edited_attributes:
             newvalues[prop] = entity[prop]
     if newvalues:
         subjtype = entity.stype.name