[Erp5-report] r37020 nicolas - /erp5/trunk/products/ERP5Type/WebDAVSupport.py

nobody at svn.erp5.org nobody at svn.erp5.org
Fri Jul 9 15:24:12 CEST 2010


Author: nicolas
Date: Fri Jul  9 15:24:11 2010
New Revision: 37020

URL: http://svn.erp5.org?rev=37020&view=rev
Log:
remove is_indexable=0,
created object is now wrapped in its final container.

May be using portal_contributions.newContent is better ??

Modified:
    erp5/trunk/products/ERP5Type/WebDAVSupport.py

Modified: erp5/trunk/products/ERP5Type/WebDAVSupport.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Type/WebDAVSupport.py?rev=37020&r1=37019&r2=37020&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Type/WebDAVSupport.py [utf8] (original)
+++ erp5/trunk/products/ERP5Type/WebDAVSupport.py [utf8] Fri Jul  9 15:24:11 2010
@@ -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
-                         )
+    container = self.getPortalObject().getDefaultModule(portal_type)
+    pt.constructContent(type_name=portal_type,
+                        container=container,
+                        id=name)
 
-    # 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
+    document = container._getOb(name)
+    return document




More information about the Erp5-report mailing list