Change the call of getGidFromXML method and use


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@28218 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 189ab83b
...@@ -49,9 +49,15 @@ class ERP5ConduitTitleGid(ERP5Conduit): ...@@ -49,9 +49,15 @@ class ERP5ConduitTitleGid(ERP5Conduit):
""" """
return object.getTitle() return object.getTitle()
# def getGidFromXML(self, xml): def getGidFromXML(self, xml, namespace, gid_from_xml_list):
# """ """
# return the Gid composed of FirstName and LastName generate with a peace of return the Gid composed of FirstName and LastName generate with a peace of
# xml xml
# """ """
# #to be defined first_name = xml.xpath('string(.//syncml:object//syncml:first_name)')
last_name = xml.xpath('string(.//syncml:object//syncml:last_name)')
gid = "%s %s" % (first_name, last_name)
if gid in gid_from_xml_list or gid == ' ':
return False
return gid
...@@ -70,7 +70,7 @@ class SharedVCardConduit(VCardConduit, SyncCode): ...@@ -70,7 +70,7 @@ class SharedVCardConduit(VCardConduit, SyncCode):
LOG('getGidFromObject gid :', DEBUG, gid) LOG('getGidFromObject gid :', DEBUG, gid)
return gid return gid
def getGidFromXML(self, vcard, gid_from_xml_list): def getGidFromXML(self, vcard, namespace, gid_from_xml_list):
""" """
return the Gid composed of FirstName and LastName generate with a vcard return the Gid composed of FirstName and LastName generate with a vcard
""" """
......
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