mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-09-17 01:32:30 +03:00
fix formatting
This commit is contained in:
parent
f95dc69e03
commit
960bebd2a3
|
@ -1440,8 +1440,7 @@ class ChoiceField(Field):
|
||||||
# integer or string input, but still get the correct datatype out.
|
# integer or string input, but still get the correct datatype out.
|
||||||
self.choice_strings_to_values = {
|
self.choice_strings_to_values = {
|
||||||
str(key.value) if isinstance(key, (IntegerChoices, TextChoices))
|
str(key.value) if isinstance(key, (IntegerChoices, TextChoices))
|
||||||
and str(key) != str(
|
and str(key) != str(key.value) else str(key): key for key in self.choices
|
||||||
key.value) else str(key): key for key in self.choices
|
|
||||||
}
|
}
|
||||||
|
|
||||||
choices = property(_get_choices, _set_choices)
|
choices = property(_get_choices, _set_choices)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user