[FIX] Support for older werkzeug versions

bzr revid: fme@openerp.com-20140129135208-liewqaib50lwbbjy
This commit is contained in:
Fabien Meghazi 2014-01-29 14:52:08 +01:00
parent 905e92d81c
commit eff61fde93
1 changed files with 1 additions and 1 deletions

View File

@ -95,7 +95,7 @@ class ir_http(orm.AbstractModel):
werkzeug.exceptions.abort(werkzeug.utils.redirect(url))
def _handle_exception(self, exception=None, code=500):
if isinstance(exception, werkzeug.exceptions.HTTPException) and exception.response:
if isinstance(exception, werkzeug.exceptions.HTTPException) and hasattr(exception, 'response') and exception.response:
return exception.response
if getattr(request, 'website_enabled', False) and request.website:
values = dict(