[Mpuls-commits] r2345 - wasko/branches/2.0/mpulsweb/controllers
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Wed Apr 14 15:07:12 CEST 2010
Author: torsten
Date: 2010-04-14 15:07:10 +0200 (Wed, 14 Apr 2010)
New Revision: 2345
Modified:
wasko/branches/2.0/mpulsweb/controllers/formularpage.py
Log:
* mpulsweb/controllers/formularpage.py (get_rendered_page): Return 404
if a page could not be found. Log error.
Modified: wasko/branches/2.0/mpulsweb/controllers/formularpage.py
===================================================================
--- wasko/branches/2.0/mpulsweb/controllers/formularpage.py 2010-04-14 12:53:31 UTC (rev 2344)
+++ wasko/branches/2.0/mpulsweb/controllers/formularpage.py 2010-04-14 13:07:10 UTC (rev 2345)
@@ -10,6 +10,7 @@
from pylons import request, session, c
from pylons import g
from pylons.i18n import _
+from pylons.controllers.util import abort
from formed.instance.backends.postgres import DBFactory as InstanceFactory
from formed.instance.tree import SetDataException, RepeatInstanceContainerNode
@@ -103,6 +104,9 @@
session['case'].setPageId(c.page_id)
session['navigation.selectedpage'] = id
session.save()
+ else:
+ log.error('Page not found %s' % id)
+ return abort(404)
# Render form and use htmlfill to fillout the form and mark errorfields.
form = render('/formularpage/content.mako')
More information about the Mpuls-commits
mailing list