Просмотр исходного кода

cast filter() to list for py3k

Rafał Pitoń 8 лет назад
Родитель
Сommit
08649817ad
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      misago/users/views/lists.py

+ 1 - 1
misago/users/views/lists.py

@@ -56,7 +56,7 @@ class ListView(View):
                 'component': 'rank',
             })
 
-        active_section = filter(lambda x: x['is_active'], sections)[0]
+        active_section = list(filter(lambda x: x['is_active'], sections))[0]
         context_data['active_section'] = active_section
 
         return render(request, self.template_name, context_data)