[Erp5-report] r38825 fabien - /erp5/trunk/products/ERP5/Document/TextDocument.py

nobody at svn.erp5.org nobody at svn.erp5.org
Fri Oct 1 11:16:57 CEST 2010


Author: fabien
Date: Fri Oct  1 11:16:48 2010
New Revision: 38825

URL: http://svn.erp5.org?rev=38825&view=rev
Log:
some old documents don't have any content_type defined

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=38825&r1=38824&r2=38825&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/Document/TextDocument.py [utf8] (original)
+++ erp5/trunk/products/ERP5/Document/TextDocument.py [utf8] Fri Oct  1 11:16:48 2010
@@ -127,7 +127,7 @@ class TextDocument(CachedConvertableMixi
       """
         Convert text using portal_transforms or oood
       """
-      src_mimetype = self.getContentType()
+      src_mimetype = self.getContentType() or DEFAULT_CONTENT_TYPE
       if not format and src_mimetype == 'text/html':
         format = 'html' # Force safe_html
       if not format:




More information about the Erp5-report mailing list