Commit af205cdb authored by Łukasz Nowak's avatar Łukasz Nowak

- do nothing in case if invoked on non loggable object (by Jérome)


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@35638 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 6f2cf141
......@@ -61,6 +61,10 @@ portal = context.getPortalObject()\n
if not portal.Base_checkPermission(\'portal_preferences\', \'Add portal content\'):\n
return\n
\n
if not context.getReference():\n
# noop in case if invoked on non loggable object\n
return\n
\n
from Products.ERP5Type.Message import translateString\n
preference = portal.portal_preferences.createPreferenceForUser(\n
context.getReference(), enable=True)\n
......
756
\ No newline at end of file
757
\ 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