r252355 - in collective.contentrules.mailtogroup/trunk: collective/contentrules/mailtogroup/actions docs

"Ida Ebkes" <svn-changes-z4DKO/[email protected]>
Newsgroups gmane.comp.web.zope.plone.collective.cvs
Message-ID <[email protected]>
Author: ida
Date: Fri May  3 06:10:55 2013
New Revision: 252355

Modified:
   collective.contentrules.mailtogroup/trunk/collective/contentrules/mailtogroup/actions/mail.py
   collective.contentrules.mailtogroup/trunk/docs/HISTORY.txt
Log:
Added exeption for text-variable

Modified: collective.contentrules.mailtogroup/trunk/collective/contentrules/mailtogroup/actions/mail.py
==============================================================================
--- collective.contentrules.mailtogroup/trunk/collective/contentrules/mailtogroup/actions/mail.py	(original)
+++ collective.contentrules.mailtogroup/trunk/collective/contentrules/mailtogroup/actions/mail.py	Fri May  3 06:10:55 2013
@@ -140,8 +140,11 @@
         obj = self.event.object
         event_title = safe_unicode(obj.Title())
         event_url = obj.absolute_url()
-        event_text = safe_unicode(obj.getText())
-        
+        # Not all items have a text-field:
+        try:
+            event_text = safe_unicode(obj.getText())
+        except:
+            event_text = ''
         message = self.element.message.replace("${url}", event_url)
         message = message.replace("${title}", event_title)
         message = message.replace("${namedirectory}", self.context.Title())

Modified: collective.contentrules.mailtogroup/trunk/docs/HISTORY.txt
==============================================================================
--- collective.contentrules.mailtogroup/trunk/docs/HISTORY.txt	(original)
+++ collective.contentrules.mailtogroup/trunk/docs/HISTORY.txt	Fri May  3 06:10:55 2013
@@ -4,7 +4,8 @@
 1.4dev (unreleased)
 -------------------
 
--
+- Added exeption, if text-variable is used, but an item doesn't have a text-field.
+  Concerns actions/mail.py [ida]
 
 
 1.3 (2012-02-15)

------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite
It's a free troubleshooting tool designed for production
Get down to code-level detail for bottlenecks, with <2% overhead.
Download for free and get started troubleshooting in minutes.
http://p.sf.net/sfu/appdyn_d2d_ap2
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.