# HG changeset patch # User Sylvain Thénault # Date 1249656560 -7200 # Node ID 7ab70fad02df3cda63cc3c30c8eca94f6bf3d1be # Parent 2403260cb5b425c8e3066b7bfed71d76b97253ad [schema changes] check entity is not being deleted and get only actually modified attributes diff -r 2403260cb5b4 -r 7ab70fad02df server/schemahooks.py --- 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