changeset 2397:c458e6488535

Make sure all orphaned pages exist
author Radomir Dopieralski <sheep-devel@sheep.art.pl>
date Sun, 12 May 2013 18:00:24 +0200
parents e7d632603113
children 019e3bfa96ee
files hatta/wiki.py
diffstat 1 files changed, 6 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/hatta/wiki.py	Sun May 12 17:43:03 2013 +0200
+++ b/hatta/wiki.py	Sun May 12 18:00:24 2013 +0200
@@ -775,8 +775,13 @@
 
         _ = self.gettext
         page = self.get_page(request, '')
+        orphaned = [
+            title
+            for title in self.index.orphaned_pages()
+            if title in self.storage
+        ]
         html = page.template('list.html',
-                             pages=self.index.orphaned_pages(),
+                             pages=orphaned,
                              class_='orphaned',
                              message=_(u'List of pages with no links to them'),
                              special_title=_(u'Orphaned pages'))