From d9f8c644fec91552e06cc8d1e14e31852581a294 Mon Sep 17 00:00:00 2001 From: Ross Scroggs Date: Tue, 25 Feb 2025 08:32:54 -0800 Subject: [PATCH] Handle ERROR 400: malformedWorkingLocationEvent error --- src/GamUpdate.txt | 8 ++++++++ src/gam/__init__.py | 7 ++++--- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/src/GamUpdate.txt b/src/GamUpdate.txt index 9022bf8d..43809460 100644 --- a/src/GamUpdate.txt +++ b/src/GamUpdate.txt @@ -1,3 +1,11 @@ +7.05.04 + +Updated `gam calendars update events` and `gam update events` +to handle the following error: +``` +ERROR 400: malformedWorkingLocationEvent - A working location event must have a visibility setting of public. +``` + 7.05.03 Fixed bug in `gam all users print users issuspended false allfields` that caused a trap. diff --git a/src/gam/__init__.py b/src/gam/__init__.py index 66577b29..d897289a 100755 --- a/src/gam/__init__.py +++ b/src/gam/__init__.py @@ -25,7 +25,7 @@ https://github.com/GAM-team/GAM/wiki """ __author__ = 'GAM Team ' -__version__ = '7.05.03' +__version__ = '7.05.04' __license__ = 'Apache License 2.0 (http://www.apache.org/licenses/LICENSE-2.0)' #pylint: disable=wrong-import-position @@ -39054,7 +39054,8 @@ def _updateCalendarEvents(origUser, user, origCal, calIds, count, calendarEventE event = callGAPI(cal.events(), 'patch', throwReasons=GAPI.CALENDAR_THROW_REASONS+[GAPI.NOT_FOUND, GAPI.DELETED, GAPI.FORBIDDEN, GAPI.INVALID, GAPI.REQUIRED, GAPI.TIME_RANGE_EMPTY, GAPI.EVENT_DURATION_EXCEEDS_LIMIT, - GAPI.REQUIRED_ACCESS_LEVEL, GAPI.CANNOT_CHANGE_ORGANIZER_OF_INSTANCE], + GAPI.REQUIRED_ACCESS_LEVEL, GAPI.CANNOT_CHANGE_ORGANIZER_OF_INSTANCE, + GAPI.MALFORMED_WORKING_LOCATION_EVENT], calendarId=calId, eventId=eventId, conferenceDataVersion=1, sendUpdates=parameters['sendUpdates'], supportsAttachments=True, body=body, fields=pfields) if parameters['csvPF'] is None: @@ -39069,7 +39070,7 @@ def _updateCalendarEvents(origUser, user, origCal, calIds, count, calendarEventE break entityActionFailedWarning([Ent.CALENDAR, calId, Ent.EVENT, eventId], str(e), j, jcount) except (GAPI.forbidden, GAPI.invalid, GAPI.required, GAPI.timeRangeEmpty, GAPI.eventDurationExceedsLimit, - GAPI.requiredAccessLevel, GAPI.cannotChangeOrganizerOfInstance) as e: + GAPI.requiredAccessLevel, GAPI.cannotChangeOrganizerOfInstance, GAPI.malformedWorkingLocationEvent) as e: entityActionFailedWarning([Ent.CALENDAR, calId, Ent.EVENT, eventId], str(e), j, jcount) except GAPI.notACalendarUser: userCalServiceNotEnabledWarning(calId, i, count)