Commit c5411dce authored by Kevin Deldycke's avatar Kevin Deldycke

If no default document is defined, return the document value instead of context.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@8112 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 2be5b056
...@@ -72,7 +72,11 @@ ...@@ -72,7 +72,11 @@
if portal_type == \'Web Site\':\n if portal_type == \'Web Site\':\n
return None\n return None\n
if portal_type == \'Web Section\' and not getattr(context.REQUEST, \'editable_mode\', None):\n if portal_type == \'Web Section\' and not getattr(context.REQUEST, \'editable_mode\', None):\n
return context.WebSite_getDefaultDocumentValue()\n document_value = context.WebSite_getDefaultDocumentValue()\n
if document_value == None:\n
# No default document is defined, return context as document value\n
return context\n
return document_value\n
return context\n return context\n
</string> </value> </string> </value>
</item> </item>
...@@ -125,6 +129,7 @@ return context\n ...@@ -125,6 +129,7 @@ return context\n
<string>portal_type</string> <string>portal_type</string>
<string>None</string> <string>None</string>
<string>getattr</string> <string>getattr</string>
<string>document_value</string>
</tuple> </tuple>
</value> </value>
</item> </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