diff --git a/rest_framework/fields.py b/rest_framework/fields.py index d7e7816ce..dff9253a9 100644 --- a/rest_framework/fields.py +++ b/rest_framework/fields.py @@ -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)