Rafał Pitoń 8 лет назад
Родитель
Сommit
e137933c2a
1 измененных файлов с 2 добавлено и 2 удалено
  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)