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): ...@@ -574,8 +574,8 @@ class BTreeDatabaseManager(DatabaseManager):
result = {} result = {}
for oid, tserial in safeIter(self._obj.items, min=min_oid): for oid, tserial in safeIter(self._obj.items, min=min_oid):
if oid % num_partitions == partition: if oid % num_partitions == partition:
result[p64(oid)] = tid_list = [] if length == 0:
append = tid_list.append break
if oid == min_oid: if oid == min_oid:
try: try:
tid_seq = tserial.keys(min=min_serial, max=max_serial) tid_seq = tserial.keys(min=min_serial, max=max_serial)
...@@ -583,6 +583,10 @@ class BTreeDatabaseManager(DatabaseManager): ...@@ -583,6 +583,10 @@ class BTreeDatabaseManager(DatabaseManager):
continue continue
else: else:
tid_seq = tserial.keys(max=max_serial) 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: for tid in tid_seq:
if length == 0: if length == 0:
break 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