File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change 5
5
# them and/or modify them under the terms of the MIT License; see
6
6
# the LICENSE file for more details.
7
7
8
+ from datetime import datetime
8
9
from pprint import pformat
9
10
11
+ import pytz
10
12
import requests
11
13
from markupsafe import Markup
12
14
from requests .exceptions import RequestException , Timeout
@@ -113,7 +115,11 @@ def _update_calendar_entry(entry, settings):
113
115
logger .debug ('User %s has disabled calendar entries' , user )
114
116
return True
115
117
116
- unique_id = '{}{}_{}' .format (settings ['id_prefix' ], user .id , entry .event_id )
118
+ # Use common format for event calendar ID if the event was created on or after 2025-04-06
119
+ if entry .event .created_dt >= datetime (2025 , 4 , 6 , tzinfo = pytz .UTC ):
120
+ unique_id = entry .event .ical_uid
121
+ else :
122
+ unique_id = '{}{}_{}' .format (settings ['id_prefix' ], user .id , entry .event_id )
117
123
path = f'/api/v1/users/{ user .email } /events/{ unique_id } '
118
124
url = settings ['service_url' ].rstrip ('/' ) + path
119
125
if entry .action in {OutlookAction .add , OutlookAction .update }:
You can’t perform that action at this time.
0 commit comments