Merge pull request #8588 from hrwX/gc-fixes
fix: TypeError: 'NoneType' object is not iterable
This commit is contained in:
commit
2f0cc559eb
2 changed files with 2 additions and 2 deletions
|
|
@ -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"):
|
||||
|
|
|
|||
|
|
@ -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"):
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue