Commit f9592522 authored by Godefroid Chapelle's avatar Godefroid Chapelle

`undoMultiple` was still broken as transactions were not undone

in the proper order : tids were stored and retrieved as dictionary keys. 
parent 0c6cdd72
......@@ -11,6 +11,9 @@ http://docs.zope.org/zope2/releases/.
Bugs Fixed
++++++++++
- `undoMultiple` was still broken as transactions were not undone in the proper
order : tids were stored and retrieved as dictionary keys.
- Updated distributions:
- Products.ZCatalog = 2.13.20
......
......@@ -132,15 +132,17 @@ class UndoSupport(ExtensionClass.Base):
def manage_undo_transactions(self, transaction_info=(), REQUEST=None):
"""
"""
tids = {}
tids = []
descriptions = []
for tid in transaction_info:
tid = tid.split()
if tid:
tids[decode64(tid[0])] = tid[-1]
tids.append(decode64(tid[0]))
descriptions.append(tid[-1])
if tids:
transaction.get().note("Undo %s" % ' '.join(tids.values()))
self._p_jar.db().undoMultiple(tids.keys())
transaction.get().note("Undo %s" % ' '.join(descriptions))
self._p_jar.db().undoMultiple(tids)
if REQUEST is None:
return
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment