parent
b2b1e137b2
commit
09d785f5bb
|
|
@ -35,13 +35,12 @@ def _polymorhic_iterator(queryset, base_iter):
|
||||||
but it requests the objects in chunks from the database,
|
but it requests the objects in chunks from the database,
|
||||||
with Polymorphic_QuerySet_objects_per_request per chunk
|
with Polymorphic_QuerySet_objects_per_request per chunk
|
||||||
"""
|
"""
|
||||||
while True:
|
|
||||||
base_result_objects = []
|
|
||||||
reached_end = False
|
|
||||||
|
|
||||||
# Make sure the base iterator is read in chunks instead of
|
# Make sure the base iterator is read in chunks instead of
|
||||||
# reading it completely, in case our caller read only a few objects.
|
# reading it completely, in case our caller read only a few objects.
|
||||||
for i in range(Polymorphic_QuerySet_objects_per_request):
|
for i in range(Polymorphic_QuerySet_objects_per_request):
|
||||||
|
base_result_objects = []
|
||||||
|
reached_end = False
|
||||||
|
|
||||||
try:
|
try:
|
||||||
o = next(base_iter)
|
o = next(base_iter)
|
||||||
base_result_objects.append(o)
|
base_result_objects.append(o)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue