Commit e2f57916 authored by Sriram Karra's avatar Sriram Karra

In batch_update pass the con_itemid where it is available

This got missed out when we made changes to the *Contact
constructors. This was causing failed sync of mods to GC - a
regression
parent e53d2a0b
......@@ -244,7 +244,8 @@ class CDContactsFolder(Folder):
## that happens the next line will throw an KeyError. You are
## warned.
con_old = cons[href]
con_new = CDContact(self, con=item)
con_itemid = item.get_itemid_from_synctags(pname, 'cd')
cd = CDContact(self, con=item, con_itemid=con_itemid)
con_new.set_uid(con_old.get_uid())
con_new.update_sync_tags(src_sync_tag, item.get_itemid())
......
......@@ -375,7 +375,8 @@ class GCContactsFolder(Folder):
stats = BatchState(1, f, 'update', sync_tag=dst_sync_tag)
for item, etag in zip(items, etags):
gc = GCContact(self, con=item)
con_itemid = item.get_itemid_from_synctags(pname, 'gc')
gc = GCContact(self, con=item, con_itemid=con_itemid)
bid = item.get_itemid()
gc.update_sync_tags(src_sync_tag, bid)
......
......@@ -249,7 +249,8 @@ class OLFolder(Folder):
store = self.get_msgstore().get_obj()
success = True
for item in items:
olc = OLContact(self, con=item)
con_itemid = item.get_itemid_from_synctags(pname, 'ol')
olc = OLContact(self, con=item, con_itemid=con_itemid)
## We lose the sync tag as well when we blow everything. To ensure
## this gets recreated, put it back in.
......
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