Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions O365/calendar.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,10 @@ class EventAttachment(BaseAttachment):


class EventAttachments(BaseAttachments):
_endpoints = {'attachments': '/events/{id}/attachments'}
_endpoints = {
'attachments': '/events/{id}/attachments',
'attachment': '/events/{id}/attachments/{ida}'
}

_attachment_constructor = EventAttachment

Expand Down Expand Up @@ -957,10 +960,13 @@ def to_api_data(self, restrict_keys=None):

if self.__recurrence:
data[cc('recurrence')] = self.__recurrence.to_api_data()

if self.has_attachments:
data[cc('attachments')] = self.__attachments.to_api_data()

if 'attachments' in restrict_keys:
self.attachments._update_attachments_to_cloud()

if restrict_keys:
for key in list(data.keys()):
if key not in restrict_keys:
Expand Down