Commit 0068ca32 authored by Yoshinori Okuji's avatar Yoshinori Okuji

Avoid copying a SESSION object in asContext, because it is newly created...

Avoid copying a SESSION object in asContext, because it is newly created implicitly when not present, thus it may induce conflict errors. As ERP5 does not use Zope sessions, it is better to skip SESSION.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@15477 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent d2d6f5ce
......@@ -2121,7 +2121,12 @@ class Base( CopyContainer,
context.__dict__.update(self.__dict__)
# Copy REQUEST properties to self
if REQUEST is not None:
context.__dict__.update(REQUEST)
# Avoid copying a SESSION object, because it is newly created
# implicitly when not present, thus it may induce conflict errors.
# As ERP5 does not use Zope sessions, it is better to skip SESSION.
for k in REQUEST.keys():
if k != 'SESSION':
context[k] = REQUEST[k]
# Define local properties
if kw is not None: context.__dict__.update(kw)
# Make it a temp content
......
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