Commit 5ccd0bc2 authored by Ivan Tyagov's avatar Ivan Tyagov

When generating breadcumb list, not always parent object is accessible (for anonymous user).

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@20973 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 718ee920
......@@ -3,11 +3,8 @@
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<tuple>
<string>Products.PythonScripts.PythonScript</string>
<string>PythonScript</string>
</tuple>
<none/>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
<tuple/>
</tuple>
</pickle>
<pickle>
......@@ -135,8 +132,12 @@ while crumb is not None:\n
if crumb.getPortalType() == \'Web Site\':\n
crumb = None # Don\'t go higher than the first Web Site found\n
else:\n
crumb = crumb.aq_parent # Acquisition through context\n
\n
# try accessing parent object (which might not always be possible)\n
try:\n
crumb = crumb.aq_parent\n
except:\n
crumb = None\n
\n
crumb_list.reverse()\n
return crumb_list\n
</string> </value>
......
627
\ No newline at end of file
628
\ No newline at end of file
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