Commit 1a7b298b authored by Sylvain Thénault's avatar Sylvain Thénault
Browse files

actual_session deprecated in 3.7

parent 04cfb4415564
......@@ -20,8 +20,7 @@ from cubicweb.server import hook
def fix_ownership(session, eid, email):
sender = email.senderaddr.email_of
if (sender and sender.e_schema == 'CWUser' and
sender.eid != session.actual_session().user.eid):
if sender and sender.e_schema == 'CWUser' and sender.eid != session.user.eid:
# match a user which is not the session's user, set owned_by / created_by
session.execute('SET X owned_by U WHERE X eid %(x)s, U eid %(u)s',
{'x': eid, 'u': sender.eid})
......
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