Commit 30f7996a authored by Vincent Pelletier's avatar Vincent Pelletier

Fix packing un-created objects.

Also, comment a bit.

git-svn-id: https://svn.erp5.org/repos/neo/trunk@2463 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent b973cc15
......@@ -637,14 +637,12 @@ class BTreeDatabaseManager(DatabaseManager):
try:
max_serial = tserial.maxKey(tid)
except ValueError:
# No entry before pack TID, nothing to pack on this object.
return False
try:
tserial.maxKey(max_serial)
except ValueError:
if tserial[max_serial][2] == '':
max_serial += 1
else:
return False
if tserial[max_serial][2] == '':
# Last version before/at pack TID is a creation undo, drop
# it too.
max_serial += 1
def serial_callback(serial, _):
updatePackFuture(oid, serial, max_serial,
updateObjectDataForPack)
......
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