fix: work-around to fix issue with syncing Google Contacts (#22649)

Issue #22648
This commit is contained in:
Anand Chitipothu 2023-10-16 12:29:49 +05:30 committed by GitHub
parent bbf91b8afc
commit aff3f66366
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -155,6 +155,10 @@ def sync_contacts_from_google_contacts(g_contact):
frappe.publish_realtime(
"import_google_contacts", dict(progress=idx + 1, total=len(results)), user=frappe.session.user
)
# Work-around to fix
# https://github.com/frappe/frappe/issues/22648
if not connection.get("names"):
continue
for name in connection.get("names"):
if name.get("metadata").get("primary"):