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,7 +901,10 @@ class ERP5Conduit(XMLSyncUtilsMixin): ...@@ -901,7 +901,10 @@ class ERP5Conduit(XMLSyncUtilsMixin):
data = pickle.loads(data) data = pickle.loads(data)
elif data_type in self.date_type_list: elif data_type in self.date_type_list:
data = DateTime(data) data = DateTime(data)
elif data_type in self.dict_type_list: 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(',')) dict_list = map(lambda x:x.split(':'),data[1:-1].split(','))
data = map(lambda (x,y):(x.replace(' ','').replace("'",''),int(y)),dict_list) data = map(lambda (x,y):(x.replace(' ','').replace("'",''),int(y)),dict_list)
data = dict(data) data = dict(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