diff --git a/project/views.py b/project/views.py index 53edf673..9c3ac5b2 100644 --- a/project/views.py +++ b/project/views.py @@ -105,7 +105,8 @@ class IndexView(TemplateView): shuffle(review_images) teachers = User.objects.filter( role=User.TEACHER_ROLE, show_in_mainpage=True) - if teachers.count() % 2 == 0: + + if teachers.count() % 2 == 0 and teachers.count() > 2: teachers = teachers[:teachers.count() - 1] context.update({