Skip to content
Snippets Groups Projects
Commit d3929396 authored by Tomáš Valenta's avatar Tomáš Valenta
Browse files

fix loading more articles

parent 066ea323
No related branches found
No related tags found
2 merge requests!861Release: New homepage design,!843fix loading more articles
Pipeline #15929 passed
......@@ -518,7 +518,7 @@ class MainArticlesPage(
search_filter = self.get_search_filters(request)
article_timeline_list = self.get_article_data_list(months, search_filter)
context = {"article_timeline_list": article_list}
context = {"article_timeline_list": article_timeline_list}
data = {
"html": render(
......@@ -534,10 +534,9 @@ class MainArticlesPage(
MainArticlePage.objects.filter(search_filter)
)
.live()
.order_by("-union_date")
.last()
)
not in article_list[-1]["articles"]
.order_by("union_date")[:2] # LIMIT 2
)[0]
not in article_timeline_list[-1]["articles"]
)
),
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment