Skip to content

Commit af9e3ca

Browse files
committed
Fix test collection
1 parent 3cd056e commit af9e3ca

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

graphene_django/converter.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
)
2020
from graphene.types.json import JSONString
2121
from graphene.utils.str_converters import to_camel_case, to_const
22-
from graphql import assert_valid_name
22+
from graphql import assert_valid_name, GraphQLError
2323

2424
from .compat import ArrayField, HStoreField, JSONField, RangeField
2525
from .fields import DjangoListField, DjangoConnectionField
@@ -32,7 +32,7 @@ def convert_choice_name(name):
3232
name = to_const(force_text(name))
3333
try:
3434
assert_valid_name(name)
35-
except AssertionError:
35+
except GraphQLError:
3636
name = "A_%s" % name
3737
return name
3838

@@ -48,7 +48,7 @@ def get_choices(choices):
4848
while name in converted_names:
4949
name += "_" + str(len(converted_names))
5050
converted_names.append(name)
51-
description = help_text
51+
description = str(help_text) # TODO: translatable description: https://github.com/graphql-python/graphql-core-next/issues/58
5252
yield name, value, description
5353

5454

0 commit comments

Comments
 (0)