# HG changeset patch # User Ludovic Chabant # Date 1408429203 25200 # Node ID 53b9df2263dc3f40fb5fd3d14ac6c619cd413493 # Parent c95c90c8226368ce47f9db1aabac4d1639a04ec1 Fix for pages listing pages from other sources. diff -r c95c90c82263 -r 53b9df2263dc piecrust/data/iterators.py --- a/piecrust/data/iterators.py Mon Aug 18 16:54:00 2014 -0700 +++ b/piecrust/data/iterators.py Mon Aug 18 23:20:03 2014 -0700 @@ -32,7 +32,10 @@ self._cache = inner_list[self.offset:] if self.current_page: - idx = inner_list.index(self.current_page) + try: + idx = inner_list.index(self.current_page) + except ValueError: + idx = -1 if idx >= 0: if idx < self.inner_count - 1: self.next_page = inner_list[idx + 1]