Commit ec33162f authored by Vincent Pelletier's avatar Vincent Pelletier

Delete whole object when its last revision is deleted.

Also, call prune() when deleting object, to reuse its btree instance.

git-svn-id: https://svn.erp5.org/repos/neo/trunk@2461 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent bd3b9cfd
......@@ -422,13 +422,14 @@ class BTreeDatabaseManager(DatabaseManager):
except KeyError:
pass
else:
if serial is None:
del obj[oid]
else:
if serial is not None:
try:
del tserial[serial]
except KeyError:
pass
if serial is None or not tserial:
prune(obj[oid])
del obj[oid]
def getTransaction(self, tid, all=False):
tid = util.u64(tid)
......
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