Merge pull request #8588 from hrwX/gc-fixes

fix: TypeError: 'NoneType' object is not iterable
This commit is contained in:
Himanshu 2019-10-11 15:40:09 +05:30 committed by GitHub
commit 2f0cc559eb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -220,7 +220,7 @@ def sync_events_from_google_calendar(g_calendar, method=None, page_length=10):
except HttpError as err:
frappe.throw(_("Google Calendar - Could not fetch event from Google Calendar, error code {0}.").format(err.resp.status))
for event in events.get("items"):
for event in events.get("items", []):
results.append(event)
if not events.get("nextPageToken"):

View file

@ -155,7 +155,7 @@ def sync_contacts_from_google_contacts(g_contact):
except HttpError as err:
frappe.throw(_("Google Contacts - Could not sync contacts from Google Contacts {0}, error code {1}.").format(account.name, err.resp.status))
for contact in contacts.get("connections"):
for contact in contacts.get("connections", []):
results.append(contact)
if not contacts.get("nextPageToken"):