[Erp5-report] r14491 - /erp5/trunk/products/ERP5/Tool/NotificationTool.py

nobody at svn.erp5.org nobody at svn.erp5.org
Tue May 15 15:05:58 CEST 2007


Author: ivan
Date: Tue May 15 15:05:57 2007
New Revision: 14491

URL: http://svn.erp5.org?rev=14491&view=rev
Log:
Minor fixes. Get only first found result

Modified:
    erp5/trunk/products/ERP5/Tool/NotificationTool.py

Modified: erp5/trunk/products/ERP5/Tool/NotificationTool.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/Tool/NotificationTool.py?rev=14491&r1=14490&r2=14491&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/Tool/NotificationTool.py (original)
+++ erp5/trunk/products/ERP5/Tool/NotificationTool.py Tue May 15 15:05:57 2007
@@ -91,7 +91,7 @@
 
     # Change all strings to object values
     if isinstance(sender, basestring):
-      sender = catalog_tool.getObject(portal_type='Person', reference=sender)
+      sender = catalog_tool(portal_type='Person', reference=sender)[0]
 
     email_from_address = None
     if sender is not None:
@@ -109,7 +109,7 @@
       recipient = [recipient]
     to_list = []
     for user in recipient:
-      user_value = catalog_tool.getObject(portal_type='Person', reference=user)
+      user_value = catalog_tool(portal_type='Person', reference=user)[0]
       if user_value is not None:
         to_list.append(user_value)
 
@@ -128,4 +128,4 @@
     # policies such as grouped notification (per hour, per day,
     # per week, etc.) depending on user preferences. It
     # also add some urgency and selection of notification
-    # tool (ex SMS vs. email)
+    # tool (ex SMS vs. email)




More information about the Erp5-report mailing list