Commit e3a704aa authored by Nicolas Delaby's avatar Nicolas Delaby

remove is_indexable=0,

created object is now wrapped in its final container.

May be using portal_contributions.newContent is better ??


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@37020 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent d3ed5ece
......@@ -234,14 +234,10 @@ class Folder:
if myType is not None and not myType.allowType( portal_type ) and \
'portal_contributions' not in self.getPhysicalPath():
raise ValueError('Disallowed subobject type: %s' % portal_type)
pt.constructContent( type_name=portal_type,
container=self,
id=name,
is_indexable=0
)
# constructContent does too much, so the object has to be removed again
obj = aq_base( self._getOb( name ) )
self._delObject( name ) # _delObject will not invoke the catalog since is_indexable was set to 0
delattr(obj, 'isIndexable') # Allow indexing again (standard case)
return obj
container = self.getPortalObject().getDefaultModule(portal_type)
pt.constructContent(type_name=portal_type,
container=container,
id=name)
document = container._getOb(name)
return document
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