From 5a95baf2a2258fb5297062ac18582129c05fb320 Mon Sep 17 00:00:00 2001 From: Tom Christie Date: Mon, 22 Sep 2014 16:52:57 +0100 Subject: Tests & tweaks for ChoiceField --- rest_framework/fields.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'rest_framework/fields.py') diff --git a/rest_framework/fields.py b/rest_framework/fields.py index 500018f3..80eadf1e 100644 --- a/rest_framework/fields.py +++ b/rest_framework/fields.py @@ -769,7 +769,9 @@ class MultipleChoiceField(ChoiceField): ]) def to_representation(self, value): - return [self.choice_strings_to_values[str(item)] for item in value] + return set([ + self.choice_strings_to_values[str(item)] for item in value + ]) # File types... -- cgit v1.2.3