divio/django-cms — pull request #3100 by intgr (2014-04-26 12:35:30+00:00)
Title: Cleanup & optimization for utils.page_resolver

Saves 1 or 2 database queries from every page fetch. See individual commit messages for explanation.

@ojii, please scrutinize the 2nd commit -- you're the author of that original code. While I can't see any reasonable use for that condition, I might be missing something in my analysis.