Commit d0619751 authored by Kevin Deldycke's avatar Kevin Deldycke

Don't return a "None" string at the end of the URL

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@8704 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 5c35a807
......@@ -71,7 +71,11 @@
<value> <string>#XXX This script should be named WebSite_getDocument\n
document = context.WebSite_getDocumentValue()\n
if document is not None:\n
return \'%s/%s\' % (context.WebSite_getSection(),document.getReference())\n
doc_url = context.WebSite_getSection()\n
doc_ref = document.getReference()\n
if doc_ref is not None:\n
doc_url += \'/%s\' % doc_ref\n
return doc_url\n
return context.WebSite_getUrl()\n
</string> </value>
</item>
......@@ -116,9 +120,11 @@ return context.WebSite_getUrl()\n
<value>
<tuple>
<string>_getattr_</string>
<string>context</string>
<string>context</string>
<string>document</string>
<string>None</string>
<string>doc_url</string>
<string>doc_ref</string>
</tuple>
</value>
</item>
......
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