Commit 767eef03 authored by Yoshinori Okuji's avatar Yoshinori Okuji

TempBase specific arguments must be patched before _edit, because...

TempBase specific arguments must be patched before _edit, because reindexObject is called implicitly.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@4692 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 8958b617
......@@ -324,11 +324,11 @@ class TempDocumentConstructor(DocumentConstructor):
def __call__(self, folder, id, REQUEST=None, **kw):
o = self.klass(id)
o = o.__of__(folder)
if kw: o.__of__(folder)._edit(force_update=1, **kw)
# Monkey patch TempBase specific arguments
for k in ('isIndexable', 'reindexObject', 'recursiveReindexObject', 'activate', 'setUid', 'setTitle', 'getTitle'):
setattr(o, k, getattr(o,"_temp_%s" % k))
o = o.__of__(folder)
if kw: o.__of__(folder)._edit(force_update=1, **kw)
return o
python_file_parser = re.compile('^(.*)\.py$')
......
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