Avoids redundant filtering with non-nested nodes.

This commit is contained in:
Pablo Chinea 2017-02-23 14:24:25 +00:00
parent 328cd50821
commit 7f471252da

View File

@ -49,6 +49,7 @@ class DjangoConnectionField(ConnectionField):
iterable = default_manager iterable = default_manager
iterable = maybe_queryset(iterable) iterable = maybe_queryset(iterable)
if isinstance(iterable, QuerySet): if isinstance(iterable, QuerySet):
if iterable is not default_manager:
iterable &= maybe_queryset(default_manager) iterable &= maybe_queryset(default_manager)
_len = iterable.count() _len = iterable.count()
else: else: