Commit 8b49381b authored by Sriram Karra's avatar Sriram Karra

Don't skip sync tags with "same" type db

See comments in the code.

BBDB is already fixed earlier.  EX, OL, and GC are addressed via this
commit. CD does not need this fix as it does not have this code
parent cfc72d03
......@@ -626,9 +626,15 @@ class CDContact(Contact):
ret = ''
i = 0
for key, val in self.get_sync_tags().iteritems():
# Skip any sync tag with CardDAV IDs as values.
if re.search(label, key) or not val:
continue
## FIXME: This was put in here for a reason. I think it had
## something to do with "reproducing" sync labels containing the
## ID on the local end itself. This was the easiest fix,
## IIRC. This clearly conflicts with the present need. We need to
## solve this problem - and apply it for all the DBs.
# # Skip any sync tag with CardDAV IDs as values.
# if re.search(label, key) or not val:
# continue
## Make the label more vCard friendly
key = string.replace(key, ':', '-')
......
......@@ -751,12 +751,18 @@ class GCContact(Contact):
label = conf.make_sync_label(pname_re, self.get_dbid())
## These will be stored as extended properties. Note that if this
## routine keeps appending the sync_tags tot he user_defined_fields,
## routine keeps appending the sync_tags to the user_defined_fields,
## with no regard for whether it already exists or not...
for key, val in self.get_sync_tags().iteritems():
# Skip any sync tag with GCIDs as values.
if re.search(label, key):
continue
## FIXME: This was put in here for a reason. I think it had
## something to do with "reproducing" sync labels containing the
## ID on the local end itself. This was the easiest fix,
## IIRC. This clearly conflicts with the present need. We need to
## solve this problem - and apply it for all the DBs.
# # Skip any sync tag with GCIDs as values.
# if re.search(label, key):
# continue
ud = gdata.contacts.data.UserDefinedField()
ud.key = key
......
......@@ -936,8 +936,16 @@ class OLContact(Contact):
continue
pname, dbid = conf.parse_sync_label(name)
if dbid == mydid:
continue
## FIXME: This was put in here for a reason. I think it had
## something to do with "reproducing" sync labels containing the
## ID on the local end itself. This was the easiest fix,
## IIRC. This clearly conflicts with the present need. We need to
## solve this problem - and apply it for all the DBs.
# if dbid == mydid:
# continue
if not pname in olps:
## This is an interesting case of a sync tag that is existing
## betwen two non-OL PIM DBs. i.e. we are dealing with a
......
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