[Erp5-report] r35631 fabien - /erp5/trunk/products/ERP5/Tool/ContributionTool.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Wed May 26 11:07:07 CEST 2010
Author: fabien
Date: Wed May 26 11:07:04 2010
New Revision: 35631
URL: http://svn.erp5.org?rev=35631&view=rev
Log:
don't try to guess content_type if it's already setup
Modified:
erp5/trunk/products/ERP5/Tool/ContributionTool.py
Modified: erp5/trunk/products/ERP5/Tool/ContributionTool.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/Tool/ContributionTool.py?rev=35631&r1=35630&r2=35631&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/Tool/ContributionTool.py [utf8] (original)
+++ erp5/trunk/products/ERP5/Tool/ContributionTool.py [utf8] Wed May 26 11:07:04 2010
@@ -246,7 +246,7 @@
# Then edit the document contents (so that upload can happen)
document._edit(**kw)
- if getattr(document, 'guessMimeType', None) is not None:
+ if not document.hasContentType() and getattr(document, 'guessMimeType', None) is not None:
# For File force to setup the mime_type
document.guessMimeType(fname=file_name)
if url:
More information about the Erp5-report
mailing list