Commit 2e7ed65d authored by Fabien Morin's avatar Fabien Morin

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.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@37481 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent b5714334
......@@ -753,7 +753,10 @@ class Document(DocumentExtensibleTraversableMixin, XMLObject, UrlMixIn, CachedCo
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....
......
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