Open lightheaded opened 2 years ago
Aha, looking at the code when debugging:
if 'attendees' in event:
attendee = [a for a in event['attendees']
if a['email'] == event['gcalcli_cal']['id']][0]
if attendee and attendee['responseStatus'] == 'declined':
return True
return False
My primary google email is event['gcalcli_cal']['id']][0]
, but I'm invited via my alias, so the array turns up empty and therefore [0]
is out of bounds.
Seeing as the attendee object looks like this
{'email': 'invitee.email@domain.com', 'self': True, 'responseStatus': 'declined'}
probably the 'self'
property should be used instead of if a['email'] == event['gcalcli_cal']['id']
? I understand this is a corner case, but I assume using an aliases in G-Suite is not that uncommon.
I'm getting an error when trying to exclude declined events from the agenda.
The "No-meeting zone" event is just a recurring event from 8:00-13:00 without any attendees or any other attributes.
Any thoughts on how to try to debug it further?