[Erp5-report] r35649 fabien - /erp5/trunk/products/ERP5/Tool/ContributionTool.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Wed May 26 16:04:51 CEST 2010
Author: fabien
Date: Wed May 26 16:04:49 2010
New Revision: 35649
URL: http://svn.erp5.org?rev=35649&view=rev
Log:
if no content_type has been set, guess it (not possible to use hasContentType
as there is a default value on the Data.py property_sheet it is always true
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=35649&r1=35648&r2=35649&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/Tool/ContributionTool.py [utf8] (original)
+++ erp5/trunk/products/ERP5/Tool/ContributionTool.py [utf8] Wed May 26 16:04:49 2010
@@ -246,7 +246,8 @@
# Then edit the document contents (so that upload can happen)
document._edit(**kw)
- if not document.hasContentType() and getattr(document, 'guessMimeType', None) is not None:
+ # if no content_type has been set, guess it
+ if 'content_type' not in kw 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