Commit 850e436e authored by Vincent Pelletier's avatar Vincent Pelletier

Products.ERP5Form.Form: Let NotFound exceptions propagate during rendering

Allows triggering the regular not-found error handling path from within
the rendering of a form.
parent 5f259059
...@@ -48,7 +48,7 @@ from Products.ERP5Type.Globals import DTMLFile, get_request ...@@ -48,7 +48,7 @@ from Products.ERP5Type.Globals import DTMLFile, get_request
from AccessControl import Unauthorized, ClassSecurityInfo from AccessControl import Unauthorized, ClassSecurityInfo
from DateTime import DateTime from DateTime import DateTime
from ZODB.POSException import ConflictError from ZODB.POSException import ConflictError
from zExceptions import Redirect from zExceptions import Redirect, NotFound
from Acquisition import aq_base, aq_get from Acquisition import aq_base, aq_get
from Products.PageTemplates.Expressions import SecureModuleImporter from Products.PageTemplates.Expressions import SecureModuleImporter
from zExceptions import Forbidden from zExceptions import Forbidden
...@@ -222,7 +222,7 @@ class TALESValue(StaticValue): ...@@ -222,7 +222,7 @@ class TALESValue(StaticValue):
kw['CONTEXTS'] = kw kw['CONTEXTS'] = kw
try: try:
value = self.tales_expr.__of__(field)(**kw) value = self.tales_expr.__of__(field)(**kw)
except (ConflictError, RuntimeError, Redirect): except (ConflictError, RuntimeError, Redirect, NotFound):
raise raise
except: except:
# We add this safety exception to make sure we always get # We add this safety exception to make sure we always get
......
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