diff --git a/uniweb/models.py b/uniweb/models.py index d63994b6009d467eca4229161b7f1a76e3e5853a..51f582d1710f03ace1f2f65c7c4465d771c7dbb0 100644 --- a/uniweb/models.py +++ b/uniweb/models.py @@ -404,7 +404,9 @@ class UniwebArticlesIndexPage(Page, SubpageMixin, MetadataPageMixin): articles = articles.filter(uniwebarticlepage__tags__name=tag) context["articles"] = Paginator(articles, ARTICLES_PER_PAGE).get_page(num) - context["tags"] = UniwebArticleTag.tags_for(UniwebArticlePage) + context["tags"] = UniwebArticleTag.tags_for(UniwebArticlePage).filter( + uniwebarticlepage__in=articles + ) context["active_tag"] = tag return context