diff --git a/opentech/public/projects/models.py b/opentech/public/projects/models.py index b1dcc115704aa5f2063a0a47c34e4a859af8baa7..eacc416ec54f2c73ccf1303be59ea62a5719a191 100644 --- a/opentech/public/projects/models.py +++ b/opentech/public/projects/models.py @@ -156,7 +156,7 @@ class ProjectIndexPage(BasePage): def get_context(self, request, *args, **kwargs): context = super().get_context(request, *args, **kwargs) - subpages = self.get_children().live() + subpages = ProjectPage.objects.descendant_of(self).live().public().select_related('icon') per_page = settings.DEFAULT_PER_PAGE page_number = request.GET.get('page') paginator = Paginator(subpages, per_page) diff --git a/opentech/public/utils/templates/utils/listing_index.html b/opentech/public/utils/templates/utils/listing_index.html index 989d2a31514f7b4e9fc95290705eb5fc3feddb44..24113906239ca4a6b578dbf32ea2ab7a3de861f7 100644 --- a/opentech/public/utils/templates/utils/listing_index.html +++ b/opentech/public/utils/templates/utils/listing_index.html @@ -10,7 +10,7 @@ <div class="wrapper wrapper--listings"> {% if subpages.object_list.exists %} - {% for subpage in subpages.object_list.specific %} + {% for subpage in subpages.object_list %} <a class="listing" href="{% pageurl subpage %}"> {% if subpage.icon %}