Skip to content

Commit 1fdd775

Browse files
author
Timothy Laurent
committed
better endswith
1 parent aa6be2c commit 1fdd775

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

graphene_django/types.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ def construct_fields(options):
2727
is_already_created = name in options.fields
2828
is_excluded = name in exclude_fields or is_already_created
2929
# https://docs.djangoproject.com/en/1.10/ref/models/fields/#django.db.models.ForeignKey.related_query_name
30-
is_no_backref = str.endswith(str(name), '+')
30+
is_no_backref = str(name).endswith('+')
3131
if is_not_in_only or is_excluded or is_no_backref:
3232
# We skip this field if we specify only_fields and is not
3333
# in there. Or when we exclude this field in exclude_fields.

0 commit comments

Comments
 (0)