[Erp5-report] r35633 fabien - /erp5/trunk/products/ERP5/Tool/ContributionTool.py

nobody at svn.erp5.org nobody at svn.erp5.org
Wed May 26 11:53:01 CEST 2010


Author: fabien
Date: Wed May 26 11:52:59 2010
New Revision: 35633

URL: http://svn.erp5.org?rev=35633&view=rev
Log:
newContent method return the document after creating it. To be consisten,
newContentFromURL should have the same behaviour, so return the created
document in the same way.

Modified:
    erp5/trunk/products/ERP5/Tool/ContributionTool.py

Modified: erp5/trunk/products/ERP5/Tool/ContributionTool.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/Tool/ContributionTool.py?rev=35633&r1=35632&r2=35633&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/Tool/ContributionTool.py [utf8] (original)
+++ erp5/trunk/products/ERP5/Tool/ContributionTool.py [utf8] Wed May 26 11:52:59 2010
@@ -631,7 +631,7 @@
       document = container.get(id, None)
       if document is not None:
         # Document aleardy exists: no need to keep on crawling
-        return
+        return document
     try:
       document = self.newContent(container_path=container_path, id=id, **kw)
       if document.isIndexContent() and document.getCrawlingDepth() >= 0:
@@ -662,6 +662,7 @@
                     activity="SQLQueue").newContentFromURL(
                       container_path=container_path, id=id,
                       repeat=repeat - 1, **kw)
+    return document
 
   def _guessPortalType(self, name, typ, body):
     """




More information about the Erp5-report mailing list