Browse Source

cast map() to list on py3.5

Rafał Pitoń 8 years ago
parent
commit
e137933c2a
1 changed files with 2 additions and 2 deletions
  1. 2 2
      misago/threads/serializers/poll.py

+ 2 - 2
misago/threads/serializers/poll.py

@@ -88,7 +88,7 @@ class EditPollSerializer(serializers.ModelSerializer):
         )
 
     def validate_choices(self, choices):
-        clean_choices = map(self.clean_choice, choices)
+        clean_choices = list(map(self.clean_choice, choices))
 
     def clean_choice(self, choice):
         clean_choice = {
@@ -138,7 +138,7 @@ class NewPollSerializer(EditPollSerializer):
         )
 
     def validate_choices(self, choices):
-        clean_choices = map(self.clean_choice, choices)
+        clean_choices = list(map(self.clean_choice, choices))
 
         self.validate_choices_num(clean_choices)