From 2c5ec48f926be9aaf2c2f14e0177f0dee67d5348 Mon Sep 17 00:00:00 2001 From: Christophe Simonis Date: Wed, 25 Jul 2018 11:01:07 +0200 Subject: [PATCH] [FIX] http: only del existing attributes Closes #25652 --- openerp/http.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/openerp/http.py b/openerp/http.py index fb569330c64..1b717590943 100644 --- a/openerp/http.py +++ b/openerp/http.py @@ -1135,7 +1135,8 @@ class OpenERPSession(werkzeug.contrib.sessions.Session): request.uid = uid request.disable_db = False - del request.env + if hasattr(request, 'env'): + del request.env if uid: self.get_context() return uid