mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-01-23 15:54:16 +03:00
remove dict compehension
This commit is contained in:
parent
5f8338e276
commit
04cc1964bd
|
@ -672,9 +672,9 @@ class FilePathField(CharField):
|
|||
)
|
||||
|
||||
self.choices = OrderedDict(field.choices)
|
||||
self.choice_strings_to_values = {
|
||||
six.text_type(key): key for key in self.choices.keys()
|
||||
}
|
||||
self.choice_strings_to_values = dict([
|
||||
(six.text_type(key), key) for key in self.choices.keys()
|
||||
])
|
||||
|
||||
def to_internal_value(self, data):
|
||||
if data == '' and self.allow_blank:
|
||||
|
|
Loading…
Reference in New Issue
Block a user