From 6c63d8d33846e0a0cb6b2ad81da3d90282bc6ae6 Mon Sep 17 00:00:00 2001
From: Vincent Pelletier <vincent@nexedi.com>
Date: Wed, 11 Apr 2007 15:27:51 +0000
Subject: [PATCH] Restore object append stripped in previous commit, because
 it's actually needed when one commits a transaction which follows one (or
 multiple) subtransaction commits.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@14049 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 product/ERP5Type/patches/Transaction.py | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/product/ERP5Type/patches/Transaction.py b/product/ERP5Type/patches/Transaction.py
index f01e27d0a7..52ebe26543 100644
--- a/product/ERP5Type/patches/Transaction.py
+++ b/product/ERP5Type/patches/Transaction.py
@@ -83,9 +83,13 @@ try:
                 # Do prepare until number of jars is stable - this could
                 # create infinite loop
                 jars_len = -1
+                objects_len = len(self._objects)
                 while len(jars) != jars_len:
                     jars_len = len(jars)
                     self._commit_prepare(jars, subjars, subtransaction)
+                    if len(self._objects) != objects_len:
+                      objects.extend(self._objects[objects_len:])
+                      objects_len = len(self._objects)
                     jars = self._get_jars(objects, subtransaction)
                 # If not subtransaction, then jars will be modified.
                 self._commit_begin(jars, subjars, subtransaction)
-- 
2.30.9