Skip to content

Commit 03b7714

Browse files
committed
Fixed event sorting
Since Start property is now a complex type, the $orderby must change to sort by the DateTime property of the Start property.
1 parent 20a9ca9 commit 03b7714

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

tutorial/outlookservice.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ def get_my_events(access_token, user_email):
6464
# - Sort the results by the Start field in ascending order
6565
query_parameters = {'$top': '10',
6666
'$select': 'Subject,Start,End',
67-
'$orderby': 'Start ASC'}
67+
'$orderby': 'Start/DateTime ASC'}
6868

6969
r = make_api_call('GET', get_events_url, access_token, user_email, parameters = query_parameters)
7070

0 commit comments

Comments
 (0)