Commit aad60f0f authored by Grégory Wisniewski's avatar Grégory Wisniewski

Don't add an empty dict in result dict

git-svn-id: https://svn.erp5.org/repos/neo/trunk@2503 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent fd566e39
......@@ -574,8 +574,8 @@ class BTreeDatabaseManager(DatabaseManager):
result = {}
for oid, tserial in safeIter(self._obj.items, min=min_oid):
if oid % num_partitions == partition:
result[p64(oid)] = tid_list = []
append = tid_list.append
if length == 0:
break
if oid == min_oid:
try:
tid_seq = tserial.keys(min=min_serial, max=max_serial)
......@@ -583,6 +583,10 @@ class BTreeDatabaseManager(DatabaseManager):
continue
else:
tid_seq = tserial.keys(max=max_serial)
if not tid_seq:
continue
result[p64(oid)] = tid_list = []
append = tid_list.append
for tid in tid_seq:
if length == 0:
break
......
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