Commit 800d619c authored by Fabien Morin's avatar Fabien Morin

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
parent ad91830e
......@@ -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):
"""
......
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