Commit fa70b2a3 authored by Gabriel Monnerat's avatar Gabriel Monnerat

refactor the code to add the path of preference separately

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@44216 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 715b0b72
...@@ -54,9 +54,20 @@ ...@@ -54,9 +54,20 @@
\n \n
if context.portal_membership.isAnonymousUser():\n if context.portal_membership.isAnonymousUser():\n
return dumps(None)\n return dumps(None)\n
\n
portal_preferences = context.portal_preferences\n portal_preferences = context.portal_preferences\n
return dumps(dict(preference=portal_preferences.getActivePreference().getRelativeUrl(), \n preference = portal_preferences.getActivePreference()\n
system_preference=portal_preferences.getActiveSystemPreference().getRelativeUrl()))\n system_preference = portal_preferences.getActiveSystemPreference()\n
\n
preference_dict = {}\n
\n
if preference:\n
preference_dict["preference"] = preference.getRelativeUrl()\n
\n
if system_preference:\n
preference_dict["system_preference"] = system_preference.getRelativeUrl()\n
\n
return dumps(preference_dict)\n
</string> </value> </string> </value>
</item> </item>
<item> <item>
......
291 292
\ No newline at end of file \ 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