Fixed a Python >= 3.7 incompatibility (see PEP 479)
This commit is contained in:
committed by
Hugo Osvaldo Barrera
parent
ee2e0a95ea
commit
0b87a5ecc8
@@ -297,7 +297,7 @@ class PolymorphicQuerySet(QuerySet):
|
|||||||
if self.polymorphic_disabled:
|
if self.polymorphic_disabled:
|
||||||
for o in base_iter:
|
for o in base_iter:
|
||||||
yield o
|
yield o
|
||||||
raise StopIteration
|
return
|
||||||
|
|
||||||
while True:
|
while True:
|
||||||
base_result_objects = []
|
base_result_objects = []
|
||||||
@@ -317,7 +317,7 @@ class PolymorphicQuerySet(QuerySet):
|
|||||||
yield o
|
yield o
|
||||||
|
|
||||||
if reached_end:
|
if reached_end:
|
||||||
raise StopIteration
|
return
|
||||||
|
|
||||||
def __repr__(self, *args, **kwargs):
|
def __repr__(self, *args, **kwargs):
|
||||||
if self.model.polymorphic_query_multiline_output:
|
if self.model.polymorphic_query_multiline_output:
|
||||||
|
|||||||
Reference in New Issue
Block a user