Commit 6b5a33bb authored by Yoshinori Okuji's avatar Yoshinori Okuji

I mistook that a piece of code was unnecessary, but actually it is required,...

I mistook that a piece of code was unnecessary, but actually it is required, because, in case where subtransactions are used, objects is independent of self._objects, but tpc_prepare may add more objects into self._objects.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@16721 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 5f10bde2
......@@ -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)
......
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