Fix ignore display_name.

Now thy map key to key. Not display_name to the key.
This commit is contained in:
Kazantcev Andrey 2021-03-21 15:11:18 +03:00 committed by GitHub
parent 0cddf097ca
commit c6d4bbbb4e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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)