mirror of
https://github.com/graphql-python/graphene-django.git
synced 2024-11-25 19:14:11 +03:00
Avoids redundant filtering with non-nested nodes.
This commit is contained in:
parent
328cd50821
commit
7f471252da
|
@ -49,7 +49,8 @@ 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):
|
||||||
iterable &= maybe_queryset(default_manager)
|
if iterable is not default_manager:
|
||||||
|
iterable &= maybe_queryset(default_manager)
|
||||||
_len = iterable.count()
|
_len = iterable.count()
|
||||||
else:
|
else:
|
||||||
_len = len(iterable)
|
_len = len(iterable)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user