From aa6be2c527303773cbb6f09b04ba5d236c955883 Mon Sep 17 00:00:00 2001 From: Timothy Laurent Date: Thu, 10 Nov 2016 00:19:35 -0800 Subject: [PATCH] cast name to string --- graphene_django/types.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/graphene_django/types.py b/graphene_django/types.py index 20a0e73..646a4b5 100644 --- a/graphene_django/types.py +++ b/graphene_django/types.py @@ -27,7 +27,7 @@ def construct_fields(options): is_already_created = name in options.fields is_excluded = name in exclude_fields or is_already_created # https://docs.djangoproject.com/en/1.10/ref/models/fields/#django.db.models.ForeignKey.related_query_name - is_no_backref = str.endswith(name, '+') + is_no_backref = str.endswith(str(name), '+') if is_not_in_only or is_excluded or is_no_backref: # We skip this field if we specify only_fields and is not # in there. Or when we exclude this field in exclude_fields.