mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-07-27 08:29:59 +03:00
Fix ignore display_name.
Now thy map key to key. Not display_name to the key.
This commit is contained in:
parent
0cddf097ca
commit
c6d4bbbb4e
|
@ -1454,7 +1454,7 @@ class ChoiceField(Field):
|
|||
# Allows us to deal with eg. integer choices while supporting either
|
||||
# integer or string input, but still get the correct datatype out.
|
||||
self.choice_strings_to_values = {
|
||||
str(key): key for key in self.choices
|
||||
str(value): key for key, value in self.choices.items()
|
||||
}
|
||||
|
||||
choices = property(_get_choices, _set_choices)
|
||||
|
|
Loading…
Reference in New Issue
Block a user