Commit 1326a382 authored by Mayoro Diagne's avatar Mayoro Diagne

do not display doc_string if it's not placed at the begining of the script

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@24079 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent e55fef28
......@@ -94,7 +94,7 @@ class DCWorkflowScriptDocumentationHelper(DocumentationHelper):
if REQUEST is not None:
if REQUEST.get('portal_skin', 'View' ) != 'View':
doc_string = source_code.split('"""')
if len(doc_string)>1:
if len(doc_string)>1 and not doc_string[0]:
return doc_string[1]
else:
return ""
......
......@@ -76,7 +76,7 @@ class ScriptPythonDocumentationHelper(DocumentationHelper):
if REQUEST is not None:
if REQUEST.get('portal_skin', 'View' ) != 'View':
doc_string = source_code.split('"""')
if len(doc_string)>1:
if len(doc_string)>1 and not doc_string[0]:
return doc_string[1]
else:
return ""
......
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