server/sources/native.py
brancholdstable
changeset 8501 b922dd08eb79
parent 8379 1a3746ec4d65
child 8508 7801f2acd1dc
--- a/server/sources/native.py	Tue Jul 10 15:07:23 2012 +0200
+++ b/server/sources/native.py	Tue Jul 31 17:25:28 2012 +0200
@@ -614,12 +614,10 @@
         etype = entities[0].__regid__
         for attr, storage in self._storages.get(etype, {}).items():
             for entity in entities:
-                try:
+                if event == 'deleted':
+                    storage.entity_deleted(entity, attr)
+                else:
                     edited = entity.cw_edited
-                except AttributeError:
-                    assert event == 'deleted'
-                    getattr(storage, 'entity_deleted')(entity, attr)
-                else:
                     if attr in edited:
                         handler = getattr(storage, 'entity_%s' % event)
                         to_restore = handler(entity, attr)