mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-07-27 08:29:59 +03:00
Update fields.py
This commit is contained in:
parent
c5be86a6db
commit
9c3cde244b
|
@ -1456,7 +1456,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(key): value for key, value in self.choices.items()
|
||||
}
|
||||
|
||||
choices = property(_get_choices, _set_choices)
|
||||
|
|
Loading…
Reference in New Issue
Block a user