[web] fix session /cnx mix in anonymized_request 3.25
authorAdrien Di Mascio <Adrien.DiMascio@logilab.fr>
Fri, 06 Oct 2017 11:45:52 +0200
branch3.25
changeset 12207 2fc04786dd36
parent 12205 a97cdb531a75
child 12210 3fa6c9ef2f51
[web] fix session /cnx mix in anonymized_request
cubicweb/web/application.py
--- a/cubicweb/web/application.py	Fri Oct 06 16:59:10 2017 +0200
+++ b/cubicweb/web/application.py	Fri Oct 06 11:45:52 2017 +0200
@@ -79,11 +79,11 @@
     from cubicweb.web.views.authentication import Session
 
     orig_cnx = req.cnx
-    anon_cnx = anonymous_cnx(orig_cnx.session.repo)
+    anon_cnx = anonymous_cnx(orig_cnx.repo)
     try:
         with anon_cnx:
             # web request expect a session attribute on cnx referencing the web session
-            anon_cnx.session = Session(orig_cnx.session.repo, anon_cnx.user)
+            anon_cnx.session = Session(orig_cnx.repo, anon_cnx.user)
             req.set_cnx(anon_cnx)
             yield req
     finally: