Commit 3b5f81ec authored by Jérome Perrin's avatar Jérome Perrin

- filter out request keys starting by field__proxyfield, like the one used for...

- filter out request keys starting by field__proxyfield, like the one used for proxyfields cache, because they are not pickleable. It would be nice to simply remove what's not picklable, but how to do this from restricted code?
- portal.ERP5Site_getAuthenticatedMemberPersonValue() just returns None if no person is found
- translate report title

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@26057 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent bf9e1563
No related merge requests found
......@@ -62,17 +62,16 @@ skin_name = request.get(\'deferred_portal_skin\', \'ODT\') or \'ODT\'\n
portal = context.getPortalObject()\n
N_ = portal.Base_translateString\n
\n
try:\n
person_value = portal.ERP5Site_getAuthenticatedMemberPersonValue()\n
except ValueError:\n
person_value = portal.ERP5Site_getAuthenticatedMemberPersonValue()\n
if person_value is None:\n
portal.changeSkin(None)\n
return context.Base_redirect(\'view\', keep_items=dict(\n
portal_status_message=N_("You didn\'t defined your email address")))\n
portal_status_message=N_("No person found for your user")))\n
\n
if person_value.getDefaultEmailText(\'\') == \'\':\n
portal.changeSkin(None)\n
return context.Base_redirect(\'view\', keep_items=dict(\n
portal_status_message=N_("You didn\'t defined your email address")))\n
portal_status_message=N_("You haven\'t defined your email address")))\n
\n
active_process = portal.portal_activities.newActiveProcess()\n
user_name = context.portal_membership.getAuthenticatedMember().getUserName()\n
......@@ -91,6 +90,9 @@ for k, v in request.other.items():\n
\'SERVER_URL\', \'AUTHENTICATION_PATH\', \'USER_PREF_LANGUAGES\', \'PARENTS\',\n
\'PUBLISHED\', \'AcceptLanguage\', \'AcceptCharset\', \'RESPONSE\',\n
\'ACTUAL_URL\'):\n
# XXX proxy fields stores a cache in request.other that cannot be pickled\n
if k.startswith(\'field__proxyfield\'):\n
continue\n
request_other[k] = v\n
\n
localizer_language = portal.Localizer.get_selected_language()\n
......@@ -114,7 +116,7 @@ portal.portal_simulation.activate(activity=\'SQLQueue\', after_tag=tag, priority
active_process_url=active_process.getRelativeUrl(),\n
skin_name=skin_name,\n
localizer_language=localizer_language,\n
title=form.getProperty(\'title\'),\n
title=N_(form.getProperty(\'title\')),\n
request_other=request_other,\n
form_path=form.getPhysicalPath(),\n
user_name=user_name,\n
......@@ -183,7 +185,6 @@ return context.Base_redirect(\'view\', keep_items=dict(\n
<string>portal</string>
<string>N_</string>
<string>person_value</string>
<string>ValueError</string>
<string>None</string>
<string>dict</string>
<string>active_process</string>
......
48
\ No newline at end of file
49
\ 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