Commit 15074e59 authored by Sriram Karra's avatar Sriram Karra

Bugfix: contact_gc - keep a group membership custom array only if it is non-empty

parent 8458b608
## ##
## Created : Tue Mar 13 14:26:01 IST 2012 ## Created : Tue Mar 13 14:26:01 IST 2012
## Last Modified : Sat Jul 14 10:25:02 IST 2012 ## Last Modified : Wed Jul 25 16:26:33 IST 2012
## ##
## Copyright (C) 2012 Sriram Karra <karra.etc@gmail.com> ## Copyright (C) 2012 Sriram Karra <karra.etc@gmail.com>
## ##
...@@ -239,12 +239,12 @@ class GCContact(Contact): ...@@ -239,12 +239,12 @@ class GCContact(Contact):
continue continue
gids.append(gid.href) gids.append(gid.href)
# We encode to json, and then escape the double quotes which if len(gids) > 0:
# will trip up the BBDB parser... Ah, the endless stream of # We encode to json, and then escape the double quotes
# hacks that keep life interesting... # which will trip up the BBDB parser... Ah, the endless
js = demjson.encode(gids) # stream of hacks that keep life interesting...
self.add_custom('gids', js = demjson.encode(gids)
js.replace('"', '\\"')) self.add_custom('gids', js.replace('"', '\\"'))
def _snarf_emails_from_gce (self, ce): def _snarf_emails_from_gce (self, ce):
"""Fetch the email entries in the specified ContactEntry object and """Fetch the email entries in the specified ContactEntry object and
......
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