Commit 6a98e910 authored by Fabien Morin's avatar Fabien Morin

if no error page reference is defined do not search documents without

reference, but return the default one.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@34396 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 04b4152e
......@@ -113,10 +113,12 @@ class WebSection(Domain, PermanentURLMixIn):
else:
request.set(web_param, False)
document = None
try:
document = PermanentURLMixIn.__bobo_traverse__(self, request, name)
except NotFound:
not_found_page_ref = self.getLayoutProperty('layout_not_found_page_reference')
if not_found_page_ref is not None:
document = PermanentURLMixIn.getDocumentValue(self, name=not_found_page_ref)
if document is None:
# if no document found, fallback on default page template
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment