diff src/server/pages.py @ 1049:6b1e1f13a299

pages: do not log error if there is not template and render method, but redirect is used
author Goffi <goffi@goffi.org>
date Thu, 25 Jan 2018 07:54:27 +0100
parents 688b52897ba0
children cdf0ebed9db7
line wrap: on
line diff
--- a/src/server/pages.py	Wed Jan 24 21:57:13 2018 +0100
+++ b/src/server/pages.py	Thu Jan 25 07:54:27 2018 +0100
@@ -203,7 +203,7 @@
             # none pages just return a 404, no further check is needed
             return
         if template is None:
-            if not callable(render):
+            if self.redirect is None and not callable(render):
                 log.error(_(u"render must be implemented and callable if template is not set"))
         else:
             if render is not None: