changeset 357:d54642e890e3

CollectLists: bug fix for not existing sub pages
author Reimar Bauer <rb.proj AT googlemail DOT com>
date Mon, 09 Feb 2009 16:42:51 +0100
parents 918af8ce7507
children 73775c708eba
files data/plugin/macro/CollectLists.py
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/data/plugin/macro/CollectLists.py	Thu Feb 05 11:16:36 2009 +0100
+++ b/data/plugin/macro/CollectLists.py	Mon Feb 09 16:42:51 2009 +0100
@@ -72,8 +72,9 @@
     filterfn = request.cfg.cache.page_template_regexact.search
     templates = request.rootpage.getPageList(filter=filterfn)
     subpages = [page for page in pages if page not in templates]
-    if subpages:
-        subpages.sort()
+    if not subpages:
+        return _("Subpage of '%(pagename)s' does not exist or you don't have enough rights.") % {"pagename": pagename}
+    subpages.sort()
 
     # use selection and order
     if column_heading: