Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 8 additions & 12 deletions rest_framework/fields.py
Original file line number Diff line number Diff line change
Expand Up @@ -1525,20 +1525,16 @@ def to_internal_value(self, data):

# Arguments for super() are needed because of scoping inside
# comprehensions.
return list(
dict.fromkeys(
super(MultipleChoiceField, self).to_internal_value(item)
for item in data
)
)
return [
super(MultipleChoiceField, self).to_internal_value(item)
for item in data
]

def to_representation(self, value):
return list(
dict.fromkeys(
self.choice_strings_to_values.get(str(item), item)
for item in value
)
)
return [
self.choice_strings_to_values.get(str(item), item)
for item in value
]


class FilePathField(ChoiceField):
Expand Down
Loading