From 800d619cbf261311f9e792851ea0b59557176ded Mon Sep 17 00:00:00 2001 From: Fabien Morin <fabien@nexedi.com> Date: Wed, 26 May 2010 09:52:59 +0000 Subject: [PATCH] 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. git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@35633 20353a03-c40f-0410-a6d1-a30d3c3de9de --- product/ERP5/Tool/ContributionTool.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/product/ERP5/Tool/ContributionTool.py b/product/ERP5/Tool/ContributionTool.py index 30042dfff3..f53e1f8714 100644 --- a/product/ERP5/Tool/ContributionTool.py +++ b/product/ERP5/Tool/ContributionTool.py @@ -631,7 +631,7 @@ class ContributionTool(BaseTool): 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 @@ class ContributionTool(BaseTool): activity="SQLQueue").newContentFromURL( container_path=container_path, id=id, repeat=repeat - 1, **kw) + return document def _guessPortalType(self, name, typ, body): """ -- 2.30.9