[Erp5-report] r38776 fabien - in /experimental/bt5/erp5_credential: SkinTemplateItem/portal...

nobody at svn.erp5.org nobody at svn.erp5.org
Thu Sep 30 09:49:45 CEST 2010


Author: fabien
Date: Thu Sep 30 09:49:43 2010
New Revision: 38776

URL: http://svn.erp5.org?rev=38776&view=rev
Log:
raise a more comprehensive error in case no Notification Message can be found.

Modified:
    experimental/bt5/erp5_credential/SkinTemplateItem/portal_skins/erp5_credential/CredentialRequest_sendAcceptedNotification.xml
    experimental/bt5/erp5_credential/bt/revision

Modified: experimental/bt5/erp5_credential/SkinTemplateItem/portal_skins/erp5_credential/CredentialRequest_sendAcceptedNotification.xml
URL: http://svn.erp5.org/experimental/bt5/erp5_credential/SkinTemplateItem/portal_skins/erp5_credential/CredentialRequest_sendAcceptedNotification.xml?rev=38776&r1=38775&r2=38776&view=diff
==============================================================================
--- experimental/bt5/erp5_credential/SkinTemplateItem/portal_skins/erp5_credential/CredentialRequest_sendAcceptedNotification.xml [utf8] (original)
+++ experimental/bt5/erp5_credential/SkinTemplateItem/portal_skins/erp5_credential/CredentialRequest_sendAcceptedNotification.xml [utf8] Thu Sep 30 09:49:43 2010
@@ -69,6 +69,8 @@ if password:\n
 #Get message from catalog\n
 notification_reference = \'crendential_request-confirmation-%s\' % notification_type\n
 notification_message = context.NotificationTool_getDocumentValue(notification_reference, recipient.getLanguage())\n
+if notification_message is None:\n
+  raise ValueError, \'Unable to found Notification Message with reference "%s".\' % notification_reference\n
 \n
 #Set notification mapping\n
 notification_mapping_dict = {\'login_name\': login}\n
@@ -145,9 +147,10 @@ portal.portal_notifications.sendMessage(
                             <string>notification_type</string>
                             <string>notification_reference</string>
                             <string>notification_message</string>
+                            <string>None</string>
+                            <string>ValueError</string>
                             <string>notification_mapping_dict</string>
                             <string>mail_text</string>
-                            <string>None</string>
                             <string>True</string>
                           </tuple>
                         </value>

Modified: experimental/bt5/erp5_credential/bt/revision
URL: http://svn.erp5.org/experimental/bt5/erp5_credential/bt/revision?rev=38776&r1=38775&r2=38776&view=diff
==============================================================================
--- experimental/bt5/erp5_credential/bt/revision [utf8] (original)
+++ experimental/bt5/erp5_credential/bt/revision [utf8] Thu Sep 30 09:49:43 2010
@@ -1 +1 @@
-218
\ No newline at end of file
+222
\ No newline at end of file




More information about the Erp5-report mailing list