Commit 842722cf authored by Romain Courteaud's avatar Romain Courteaud

Prevent error when recipient does not have a email address

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@24234 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent ad569d56
...@@ -58,6 +58,19 @@ RESPONSE = request.RESPONSE\n ...@@ -58,6 +58,19 @@ RESPONSE = request.RESPONSE\n
\n \n
portal = context.getPortalObject()\n portal = context.getPortalObject()\n
N_ = portal.Base_translateString\n N_ = portal.Base_translateString\n
\n
try:\n
person_value = portal.ERP5Site_getAuthenticatedMemberPersonValue()\n
except ValueError:\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
\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
\n
active_process = portal.portal_activities.newActiveProcess()\n active_process = portal.portal_activities.newActiveProcess()\n
user_name = context.portal_membership.getAuthenticatedMember().getUserName()\n user_name = context.portal_membership.getAuthenticatedMember().getUserName()\n
\n \n
...@@ -164,6 +177,10 @@ return context.Base_redirect(\'view\', keep_items=dict(\n ...@@ -164,6 +177,10 @@ return context.Base_redirect(\'view\', keep_items=dict(\n
<string>context</string> <string>context</string>
<string>portal</string> <string>portal</string>
<string>N_</string> <string>N_</string>
<string>person_value</string>
<string>ValueError</string>
<string>None</string>
<string>dict</string>
<string>active_process</string> <string>active_process</string>
<string>user_name</string> <string>user_name</string>
<string>skin_name</string> <string>skin_name</string>
...@@ -171,7 +188,6 @@ return context.Base_redirect(\'view\', keep_items=dict(\n ...@@ -171,7 +188,6 @@ return context.Base_redirect(\'view\', keep_items=dict(\n
<string>tag</string> <string>tag</string>
<string>priority</string> <string>priority</string>
<string>report_section_list</string> <string>report_section_list</string>
<string>dict</string>
<string>request_other</string> <string>request_other</string>
<string>_getiter_</string> <string>_getiter_</string>
<string>k</string> <string>k</string>
...@@ -182,7 +198,6 @@ return context.Base_redirect(\'view\', keep_items=dict(\n ...@@ -182,7 +198,6 @@ return context.Base_redirect(\'view\', keep_items=dict(\n
<string>idx</string> <string>idx</string>
<string>report_section</string> <string>report_section</string>
<string>doc</string> <string>doc</string>
<string>None</string>
</tuple> </tuple>
</value> </value>
</item> </item>
......
29 31
\ 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