From 5965fb9d0895a293f3675674b201b7d7794d8e2c Mon Sep 17 00:00:00 2001
From: Nicolas Delaby <nicolas@nexedi.com>
Date: Fri, 7 Mar 2008 17:28:57 +0000
Subject: [PATCH] Update property even if value is empty

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@19756 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 product/ERP5SyncML/Conduit/ERP5Conduit.py | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/product/ERP5SyncML/Conduit/ERP5Conduit.py b/product/ERP5SyncML/Conduit/ERP5Conduit.py
index 48150f4b55..38ff40e30c 100644
--- a/product/ERP5SyncML/Conduit/ERP5Conduit.py
+++ b/product/ERP5SyncML/Conduit/ERP5Conduit.py
@@ -753,13 +753,15 @@ class ERP5Conduit(XMLSyncUtilsMixin):
     if xml.nodeName.find('xupdate')>= 0:
       xml = self.getElementNodeList(xml)[0]
     for subnode in self.getElementNodeList(xml):
-      if not(subnode.nodeName in self.NOT_EDITABLE_PROPERTY):
+      if subnode.nodeName not in self.NOT_EDITABLE_PROPERTY:
         keyword_type = self.getPropertyType(subnode)
         # This is the case where the property is a list
         keyword=str(subnode.nodeName)
         if len(subnode.childNodes) > 0: # We check that this tag is not empty
           data = subnode.childNodes[0].data
-          args[keyword]=data
+        else:
+          data=None
+        args[keyword]=data
         #if args.has_key(keyword):
         #  LOG('newObject',0,'data: %s' % str(args[keyword]))
         if args.has_key(keyword):
-- 
2.30.9