Commit edea3dfe authored by Julien Muchembled's avatar Julien Muchembled

asContext() must not call _setObject on the container

This fix several test failures caused by r38650.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@38725 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 11ec803f
......@@ -167,7 +167,8 @@ class FolderMixIn(ExtensionClass.Base):
# TODO :the **kw makes it impossible to create content not based on
# ERP5TypeInformation, because factory method often do not support
# keywords arguments.
if temp_container:
container._setObject(new_id, new_instance.aq_base)
if kw:
new_instance._edit(force_update=1, **kw)
return new_instance
......
......@@ -561,8 +561,6 @@ class TempDocumentConstructor(DocumentConstructor):
# through the factory system.
if getattr(aq_base(folder), 'Destination', None) is not None:
folder = folder.Destination()
if folder.isTempObject():
folder._setObject(id, o)
o = o.__of__(folder)
if kw:
o._edit(force_update=1, **kw)
......
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