updated gcal coupling
This commit is contained in:
@@ -308,9 +308,7 @@ def delete_all_gcal_events(service=None):
|
||||
return 0
|
||||
|
||||
# Use batch request for efficiency
|
||||
from googleapiclient.http import BatchHttpRequest
|
||||
|
||||
batch = BatchHttpRequest()
|
||||
batch = service.new_batch_http_request()
|
||||
for gcal_id in gcal_ids:
|
||||
batch.add(service.events().delete(calendarId="primary", eventId=gcal_id))
|
||||
|
||||
@@ -359,9 +357,7 @@ def sync_from_local_to_google(service=None):
|
||||
events_to_create_django_id = local_events_django_id - events_at_google_django_id
|
||||
events_to_delete_google_id = events_at_google_google_id - local_events_google_id
|
||||
|
||||
from googleapiclient.http import BatchHttpRequest
|
||||
|
||||
batch = BatchHttpRequest()
|
||||
batch = service.new_batch_http_request()
|
||||
batch_is_empty = True
|
||||
|
||||
for event_django_id in events_to_create_django_id:
|
||||
|
||||
Reference in New Issue
Block a user