Mercurial > piecrust2
diff piecrust/data/paginator.py @ 886:dcdec4b951a1
admin: Get the admin panel working again.
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Tue, 20 Jun 2017 21:13:08 -0700 |
parents | 757fba54bfd3 |
children | b9374b3682f0 |
line wrap: on
line diff
--- a/piecrust/data/paginator.py Tue Jun 20 21:12:35 2017 -0700 +++ b/piecrust/data/paginator.py Tue Jun 20 21:13:08 2017 -0700 @@ -216,7 +216,8 @@ def _onIteration(self, it): if not self._pgn_set_on_ctx: - rcs = self._page.app.env.render_ctx_stack - rcs.current_ctx.setPagination(self) - self._pgn_set_on_ctx = True + rcs = self._source.app.env.render_ctx_stack + if rcs.current_ctx is not None: + rcs.current_ctx.setPagination(self) + self._pgn_set_on_ctx = True