web/request.py
changeset 10355 60b8204fcca3
parent 10354 635cfac73d28
child 10603 65ad6980976e
--- a/web/request.py	Tue Jun 10 16:01:49 2014 +0200
+++ b/web/request.py	Fri Jun 13 15:42:04 2014 +0200
@@ -981,11 +981,11 @@
         return True
 
 class ConnectionCubicWebRequestBase(_CubicWebRequestBase):
+    cnx = None
+    session = None
 
     def __init__(self, vreg, https=False, form=None, headers={}):
         """"""
-        self.cnx = None
-        self.session = None
         self.vreg = vreg
         try:
             # no vreg or config which doesn't handle translations
@@ -1005,7 +1005,7 @@
         if 'ecache' in cnx.transaction_data:
             del cnx.transaction_data['ecache']
         self.cnx = cnx
-        self.session = cnx._session
+        self.session = cnx.session
         self._set_user(cnx.user)
         self.set_user_language(cnx.user)