[Erp5-report] r34366 nicolas - /erp5/trunk/products/ERP5/Document/TextDocument.py

nobody at svn.erp5.org nobody at svn.erp5.org
Thu Apr 8 11:32:34 CEST 2010


Author: nicolas
Date: Thu Apr  8 11:32:33 2010
New Revision: 34366

URL: http://svn.erp5.org?rev=34366&view=rev
Log:
Compute better cache key (usefull for events with multiple attachments) 

Modified:
    erp5/trunk/products/ERP5/Document/TextDocument.py

Modified: erp5/trunk/products/ERP5/Document/TextDocument.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/Document/TextDocument.py?rev=34366&r1=34365&r2=34366&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/Document/TextDocument.py [utf8] (original)
+++ erp5/trunk/products/ERP5/Document/TextDocument.py [utf8] Thu Apr  8 11:32:33 2010
@@ -223,7 +223,7 @@
         # check if document has set text_content and convert if necessary
         text_content = self.getTextContent()
       if text_content:
-        if not self.hasConversion(format=format):
+        if not self.hasConversion(format=format, **kw):
           portal_transforms = getToolByName(portal, 'portal_transforms')
           filename = self.getSourceReference(self.getTitleOrId())
           if mime_type == 'text/html':
@@ -251,9 +251,9 @@
             raise ConversionError('TextDocument conversion error. '
                                   'portal_transforms failed to convert'\
                                   'to %s: %r' % (mime_type, self))
-          self.setConversion(result, original_mime_type, format=format)
+          self.setConversion(result, original_mime_type, format=format, **kw)
         else:
-          mime_type, result = self.getConversion(format=format)
+          mime_type, result = self.getConversion(format=format, **kw)
         if substitution_method_parameter_dict is None:
           substitution_method_parameter_dict = {}
         result = self._substituteTextContent(result, safe_substitute=safe_substitute,




More information about the Erp5-report mailing list