Commit b96563d0 authored by Adrien Di Mascio's avatar Adrien Di Mascio
Browse files

[web] fix session /cnx mix in anonymized_request

--HG--
branch : 3.25
parent a97cdb531a75
......@@ -79,11 +79,11 @@ def anonymized_request(req):
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:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment