We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 54372b4 commit ac09cd2Copy full SHA for ac09cd2
graphene_django/converter.py
@@ -1,5 +1,4 @@
1
import inspect
2
-from collections import OrderedDict
3
from functools import partial, singledispatch, wraps
4
5
from django.db import models
@@ -72,8 +71,13 @@ def convert_choice_name(name):
72
71
73
def get_choices(choices):
74
converted_names = []
75
- if isinstance(choices, OrderedDict):
+
+ # In restframework==3.15.0, choices are not passed
76
+ # as OrderedDict anymore, so it's safer to check
77
+ # for a dict
78
+ if isinstance(choices, dict):
79
choices = choices.items()
80
81
for value, help_text in choices:
82
if isinstance(help_text, (tuple, list)):
83
yield from get_choices(help_text)
0 commit comments