From af4c7eb58a4810a87bc4110d3a9c8e3dcc692b8a Mon Sep 17 00:00:00 2001 From: Daniele Procida Date: Mon, 18 Jun 2012 16:35:36 +0100 Subject: [PATCH] add all roots to pages list --- cms/menu.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cms/menu.py b/cms/menu.py index d18b87073af..0f47369b2f3 100644 --- a/cms/menu.py +++ b/cms/menu.py @@ -279,7 +279,8 @@ def get_nodes(self, request): pages.filter(parent__in=relevant_pages).distinct() | \ relevant_pages.distinct() | \ pages.filter(parent__in=current_page_queryset).distinct() | \ - current_page_queryset + current_page_queryset | \ + pages.filter(level=0).distinct() # do they need to be ordered here? I am not sure this is necessary pages = pages.order_by("tree_id", "lft")