[FIX] LazyResponse exceptions not properly managed in auth="none"
bzr revid: fme@openerp.com-20140116135650-c3gri2m1j80wcwca
This commit is contained in:
parent
cee6749395
commit
2e43125353
|
@ -939,7 +939,12 @@ class Root(object):
|
||||||
try:
|
try:
|
||||||
result.process()
|
result.process()
|
||||||
except(Exception), e:
|
except(Exception), e:
|
||||||
result = request.registry['ir.http']._handle_exception(e)
|
# In case of auth="none" we re-activate db getter for exception handling
|
||||||
|
request.disable_db = False
|
||||||
|
if request.db:
|
||||||
|
result = request.registry['ir.http']._handle_exception(e)
|
||||||
|
else:
|
||||||
|
raise
|
||||||
|
|
||||||
if isinstance(result, basestring):
|
if isinstance(result, basestring):
|
||||||
response = werkzeug.wrappers.Response(result, mimetype='text/html')
|
response = werkzeug.wrappers.Response(result, mimetype='text/html')
|
||||||
|
|
Loading…
Reference in New Issue