Skip to content

Commit 682c380

Browse files
committed
2 parents 3a7dcba + ef8662b commit 682c380

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

microsoftgraph/client.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ def create_calendar_event(
189189
end_timezone, recurrence_type, recurrence_interval,
190190
recurrence_days_of_week, recurrence_range_type,
191191
recurrence_range_startdate, recurrence_range_enddate,
192-
location, attendees):
192+
location, attendees, calendar=None):
193193
"""
194194
TODO: manual testing
195195
Create a new calendar event.
@@ -257,9 +257,9 @@ def create_calendar_event(
257257
},
258258
"attendees": attendees_list
259259
}
260-
260+
url = 'me/calendars/{}/events'.format(calendar) if calendar is not None else 'me/events'
261261
try:
262-
response = self._post('me/events', json=body)
262+
response = self._post(url, json=body)
263263
return response
264264
except Exception as e:
265265
return False

0 commit comments

Comments
 (0)