We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2c26774 commit 89d0f0cCopy full SHA for 89d0f0c
graphene_django/converter.py
@@ -34,7 +34,7 @@ def get_choices(choices):
34
yield choice
35
else:
36
name = convert_choice_name(value)
37
- if name in converted_names:
+ while name in converted_names:
38
name += '_' + str(len(converted_names))
39
converted_names.append(name)
40
description = help_text
graphene_django/tests/test_converter.py
@@ -178,6 +178,7 @@ class Meta:
178
179
def test_field_with_choices_collision():
180
field = models.CharField(help_text='Timezone', choices=(
181
+ ('Etc/GMT+1+2', 'Fake choice to produce double collision'),
182
('Etc/GMT+1', 'Greenwich Mean Time +1'),
183
('Etc/GMT-1', 'Greenwich Mean Time -1'),
184
))
0 commit comments