Commit f07900ba authored by Sebastien Robin's avatar Sebastien Robin

empty dict data problem


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@474 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent c9be703f
......@@ -901,10 +901,13 @@ class ERP5Conduit(XMLSyncUtilsMixin):
data = pickle.loads(data)
elif data_type in self.date_type_list:
data = DateTime(data)
elif data_type in self.dict_type_list:
dict_list = map(lambda x:x.split(':'),data[1:-1].split(','))
data = map(lambda (x,y):(x.replace(' ','').replace("'",''),int(y)),dict_list)
data = dict(data)
elif data_type in self.dict_type_list: # only usefull for CPS, with data = '{fr:1}'
if data == '{}':
data = {}
else:
dict_list = map(lambda x:x.split(':'),data[1:-1].split(','))
data = map(lambda (x,y):(x.replace(' ','').replace("'",''),int(y)),dict_list)
data = dict(data)
LOG('convertXmlValue',0,'data: %s' % str(data))
return data
......
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