mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-01-24 00:04: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.choices = OrderedDict(field.choices)
|
||||||
self.choice_strings_to_values = {
|
self.choice_strings_to_values = dict([
|
||||||
six.text_type(key): key for key in self.choices.keys()
|
(six.text_type(key), key) for key in self.choices.keys()
|
||||||
}
|
])
|
||||||
|
|
||||||
def to_internal_value(self, data):
|
def to_internal_value(self, data):
|
||||||
if data == '' and self.allow_blank:
|
if data == '' and self.allow_blank:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user