Skip to content

Commit

Permalink
Merge pull request #118 from gamingexperience/fix/node-filtery-effici…
Browse files Browse the repository at this point in the history
…ency

Avoids redundant filtering with non-nested nodes.
  • Loading branch information
syrusakbary committed Mar 3, 2017
2 parents 4cc4673 + 7f47125 commit 87f0c33
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion graphene_django/fields.py
Expand Up @@ -53,7 +53,8 @@ def connection_resolver(resolver, connection, default_manager, root, args, conte
iterable = default_manager
iterable = maybe_queryset(iterable)
if isinstance(iterable, QuerySet):
iterable &= maybe_queryset(default_manager)
if iterable is not default_manager:
iterable &= maybe_queryset(default_manager)
_len = iterable.count()
else:
_len = len(iterable)
Expand Down

0 comments on commit 87f0c33

Please sign in to comment.