Commit 6a3638dc authored by Jean-Paul Smets's avatar Jean-Paul Smets

More fixes - now unit test passes

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@10127 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 9398354b
......@@ -353,8 +353,8 @@ class TempDocumentConstructor(DocumentConstructor):
setattr(o, k, getattr(o,"_temp_%s" % k))
if kw:
o.__of__(folder)._edit(force_update=1, **kw)
if folder.isTempObject(): # Temp Object in Temp Object should use containment
folder._setObject(id, o)
if hasattr(folder, 'isTempObject') and folder.isTempObject():
folder._setObject(id, o)# Temp Object in Temp Object should use containment
return id # return id to be compatible with CMF constructInstance
else: # Temp Object in Persistent Object should use acquisition
o = o.__of__(folder)
......
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