Skip to content
Snippets Groups Projects
Verified Commit c064ddbf authored by jindra12's avatar jindra12
Browse files

Fix shared articles on articles block

parent d257d4b5
Branches
No related tags found
2 merge requests!816Release,!812Fix shared articles on articles block
Pipeline #14244 passed
......@@ -186,12 +186,11 @@ class ArticlesBlock(blocks.StructBlock):
def get_context(self, value, parent_context=None):
context = super().get_context(value, parent_context=parent_context)
count = value["lines"] * ARTICLES_PER_LINE
context["articles"] = (
value["page"]
.get_children()
.live()
.specific()
.order_by("-uniwebarticlepage__date")[:count]
articles_page = value["page"]
context["articles"] = articles_page.materialize_shared_articles_query(
articles_page.append_all_shared_articles_query(
UniwebArticlePage.objects.child_of(articles_page)
)[:count]
)
return context
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment