Skip to content
Snippets Groups Projects
Commit a357ba31 authored by Štěpán Farka's avatar Štěpán Farka
Browse files

[FIX] article main

parent 37560ba0
Branches
No related tags found
2 merge requests!607Pirati.cz,!575Feature/pirati cz
Pipeline #9605 passed
......@@ -167,7 +167,9 @@ class MainHomePage(MenuMixin, ExtendedMetadataHomePageMixin, MetadataPageMixin,
).order_by("-date")[:3]
articles_for_article_section = MainArticlePage.objects.order_by("-date")
context["article_main"] = articles_for_article_section[:1]
context["article_main"] = (
articles_for_article_section[0] if articles_for_article_section else None
)
context["article_carousel_list"] = articles_for_article_section[1:8]
return context
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment