Commit 103f84a3 authored by Nicolas Delaby's avatar Nicolas Delaby

Add support of boolean type casting.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@36875 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 5a992903
...@@ -822,6 +822,13 @@ class ERP5Conduit(XMLSyncUtilsMixin): ...@@ -822,6 +822,13 @@ class ERP5Conduit(XMLSyncUtilsMixin):
data = DateTime(data) data = DateTime(data)
elif data_type in self.int_type_list: elif data_type in self.int_type_list:
data = int(data) data = int(data)
elif data_type == self.boolean_type:
if data == 'False':
data = False
elif data == 'True':
data = True
else:
raise NotImplementedError
return data return data
......
...@@ -92,6 +92,7 @@ class SyncCode(Persistent): ...@@ -92,6 +92,7 @@ class SyncCode(Persistent):
text_type_list = ('text','string') text_type_list = ('text','string')
list_type_list = list_types list_type_list = list_types
none_type = 'None' none_type = 'None'
boolean_type = 'boolean'
force_conflict_list = ('layout_and_schema','ModificationDate') force_conflict_list = ('layout_and_schema','ModificationDate')
binary_type_list = ('image','file','document','pickle') binary_type_list = ('image','file','document','pickle')
date_type_list = ('date',) date_type_list = ('date',)
......
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