From 3ab26f0d9fff9530325a1c227f4f2e8da81b6f58 Mon Sep 17 00:00:00 2001 From: Matthew Vernon Date: Fri, 19 Oct 2018 12:41:54 +0100 Subject: [PATCH] only register gcal_link if necessary --- gooswapper.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gooswapper.py b/gooswapper.py index f3c73a0..75edd3f 100644 --- a/gooswapper.py +++ b/gooswapper.py @@ -54,7 +54,10 @@ class ex_gcal_link(exchangelib.ExtendedProperty): property_name = "google calendar event id" property_type = 'String' -exchangelib.CalendarItem.register('gcal_link',ex_gcal_link) +try: + exchangelib.CalendarItem.get_field_by_fieldname('gcal_link') +except ValueError: + exchangelib.CalendarItem.register('gcal_link',ex_gcal_link) #useful if you want to replay an event def drop_from_ex_cache(itemid): -- 2.30.2