Commit e9d266d0 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 359613a7
...@@ -132,15 +132,17 @@ class UndoSupport(ExtensionClass.Base): ...@@ -132,15 +132,17 @@ class UndoSupport(ExtensionClass.Base):
def manage_undo_transactions(self, transaction_info=(), REQUEST=None): def manage_undo_transactions(self, transaction_info=(), REQUEST=None):
""" """
""" """
tids = {} tids = []
descriptions = []
for tid in transaction_info: for tid in transaction_info:
tid = tid.split() tid = tid.split()
if tid: if tid:
tids[decode64(tid[0])] = tid[-1] tids.append(decode64(tid[0]))
descriptions.append(tid[-1])
if tids: if tids:
transaction.get().note("Undo %s" % ' '.join(tids.values())) transaction.get().note("Undo %s" % ' '.join(descriptions))
self._p_jar.db().undoMultiple(tids.keys()) self._p_jar.db().undoMultiple(tids)
if REQUEST is None: if REQUEST is None:
return 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