From 7a765537e9d0a996f81faf218663aa4b8edb8018 Mon Sep 17 00:00:00 2001 From: Jacob Foster Date: Mon, 22 May 2017 16:43:20 -0500 Subject: [PATCH] Only evaluate reverse M2Ms in get_reverse_fields --- graphene_django/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/graphene_django/utils.py b/graphene_django/utils.py index 7b4cd21..97f6fcb 100644 --- a/graphene_django/utils.py +++ b/graphene_django/utils.py @@ -33,7 +33,7 @@ def get_reverse_fields(model): yield (name, new_related) elif isinstance(related, models.ManyToOneRel): yield (name, related) - elif isinstance(related, models.ManyToManyRel) and not related.symmetrical: + elif isinstance(related, models.ManyToManyRel) and attr.reverse and not related.symmetrical: yield (name, related)