Commit f8683bcd authored by Nicolas Delaby's avatar Nicolas Delaby

Compute better cache key (usefull for events with multiple attachments)


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@34366 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 29b9958f
......@@ -223,7 +223,7 @@ class TextDocument(Document, TextContent):
# 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 @@ class TextDocument(Document, TextContent):
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,
......
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