[Erp5-report] r37481 fabien - /erp5/trunk/products/ERP5/Document/Document.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Wed Aug 4 17:42:43 CEST 2010
Author: fabien
Date: Wed Aug 4 17:42:43 2010
New Revision: 37481
URL: http://svn.erp5.org?rev=37481&view=rev
Log:
Do not errase dict if the new property is empty. Set the new property only it
there is a value related to it. This way we keep less pirioritary result in
case the more prioritary is empty, but at least we have a result.
Modified:
erp5/trunk/products/ERP5/Document/Document.py
Modified: erp5/trunk/products/ERP5/Document/Document.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/Document/Document.py?rev=37481&r1=37480&r2=37481&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/Document/Document.py [utf8] (original)
+++ erp5/trunk/products/ERP5/Document/Document.py [utf8] Wed Aug 4 17:42:43 2010
@@ -753,7 +753,10 @@ class Document(DocumentExtensibleTravers
else:
result = method()
if result is not None:
- kw.update(result)
+ if result is not None:
+ for key, value in result.iteritems():
+ if value not in (None, ''):
+ kw[key]=value
if file_name is not None:
# filename is often undefined....
More information about the Erp5-report
mailing list