File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 19
19
)
20
20
from graphene .types .json import JSONString
21
21
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
23
23
24
24
from .compat import ArrayField , HStoreField , JSONField , RangeField
25
25
from .fields import DjangoListField , DjangoConnectionField
@@ -32,7 +32,7 @@ def convert_choice_name(name):
32
32
name = to_const (force_text (name ))
33
33
try :
34
34
assert_valid_name (name )
35
- except AssertionError :
35
+ except GraphQLError :
36
36
name = "A_%s" % name
37
37
return name
38
38
@@ -48,7 +48,7 @@ def get_choices(choices):
48
48
while name in converted_names :
49
49
name += "_" + str (len (converted_names ))
50
50
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
52
52
yield name , value , description
53
53
54
54
You can’t perform that action at this time.
0 commit comments