[Neo-report] r2765 jm - /trunk/neo/client/app.py

nobody at svn.erp5.org nobody at svn.erp5.org
Mon May 30 15:59:39 CEST 2011


Author: jm
Date: Mon May 30 15:59:39 2011
New Revision: 2765

Log:
Fix 2 bugs in 'undo' implementation

- make 'undo' compatible with ZODB 3.9.x
- fix load of original version of object

Modified:
    trunk/neo/client/app.py

Modified: trunk/neo/client/app.py
==============================================================================
--- trunk/neo/client/app.py [iso-8859-1] (original)
+++ trunk/neo/client/app.py [iso-8859-1] Mon May 30 15:59:39 2011
@@ -860,9 +860,9 @@ class Application(object):
                 # object. This is an undo conflict, try to resolve it.
                 try:
                     # Load the latest version we are supposed to see
-                    data = self.load(oid, current_serial, snapshot_tid)[0]
+                    data = self.load(oid, current_serial)[0]
                     # Load the version we were undoing to
-                    undo_data = self.load(oid, undo_serial, snapshot_tid)[0]
+                    undo_data = self.load(oid, undo_serial)[0]
                 except NEOStorageNotFoundError:
                     raise UndoError('Object not found while resolving undo '
                         'conflict')
@@ -878,6 +878,8 @@ class Application(object):
                 undo_serial = None
             self._store(txn_context, oid, current_serial, data, undo_serial)
 
+        return None, () # required for ZODB < 3.10
+
     def _insertMetadata(self, txn_info, extension):
         for k, v in loads(extension).items():
             txn_info[k] = v




More information about the Neo-report mailing list