From e3511d9d24ca9adabf88d0afeccc642df9d67988 Mon Sep 17 00:00:00 2001 From: Matthew Vernon Date: Wed, 10 Oct 2018 16:45:08 +0100 Subject: [PATCH] restrict fields passed to event.save() This avoids problems where the event has some fields we can't edit. --- gooswapper.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gooswapper.py b/gooswapper.py index 7a08b72..6e1598b 100644 --- a/gooswapper.py +++ b/gooswapper.py @@ -154,7 +154,7 @@ def add_ex_to_gcal(ex_acct, gevent = gcal_acct.events().insert(calendarId=gcal_id, body=gevent).execute() event.gcal_link = gevent.get("id") - event.save() + event.save(update_fields=["gcal_link"]) events[event.item_id] = events[event.item_id]._replace(changekey=event.changekey,gcal_link=event.gcal_link) else: logger.warning("recurring events not yet supported") -- 2.30.2