Skip to content

Commit ef8662b

Browse files
committed
Modificaciones a create_calendar_event()
1 parent 5245946 commit ef8662b

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
@@ -188,7 +188,7 @@ def create_calendar_event(
188188
end_timezone, recurrence_type, recurrence_interval,
189189
recurrence_days_of_week, recurrence_range_type,
190190
recurrence_range_startdate, recurrence_range_enddate,
191-
location, attendees):
191+
location, attendees, calendar=None):
192192
"""
193193
TODO: manual testing
194194
Create a new calendar event.
@@ -256,9 +256,9 @@ def create_calendar_event(
256256
},
257257
"attendees": attendees_list
258258
}
259-
259+
url = 'me/calendars/{}/events'.format(calendar) if calendar is not None else 'me/events'
260260
try:
261-
response = self._post('me/events', json=body)
261+
response = self._post(url, json=body)
262262
return response
263263
except Exception as e:
264264
return False

0 commit comments

Comments
 (0)