From daa69fb838d81f11b80d90e3eac6a0fbefc15d40 Mon Sep 17 00:00:00 2001 From: Jeremy Kersten Date: Mon, 1 Jun 2015 10:14:25 +0200 Subject: [PATCH] [FIX] http: avoid that request.not_found crash return request.not_found crash with a internal error, because get_response takes a environment as param. Werkzeug Documentation: Keep in mind that you have to pass an environment to get_response() because some errors fetch additional information from the WSGI environment. --- openerp/http.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openerp/http.py b/openerp/http.py index 6ac8c23695d..00a4cd3c239 100644 --- a/openerp/http.py +++ b/openerp/http.py @@ -407,7 +407,7 @@ def route(route=None, **kw): return Response(response) if isinstance(response, werkzeug.exceptions.HTTPException): - response = response.get_response() + response = response.get_response(request.httprequest.environ) if isinstance(response, werkzeug.wrappers.BaseResponse): response = Response.force_type(response) response.set_default()