Skip to content

Commit 280ac5b

Browse files
fix: Change content-type of ICS export (#7468)
1 parent 707f160 commit 280ac5b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

app/api/custom/calendars.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@
1616
def export_event(event_id):
1717
event = Event.query.get_or_404(event_id)
1818
include_sessions = 'include_sessions' in request.args
19-
download = 'download' in request.args
2019

2120
response = to_ical(event, include_sessions=include_sessions)
2221

23-
if download:
24-
response = make_response(response)
22+
response = make_response(response)
23+
response.headers['Content-Type'] = 'text/calendar'
24+
if 'download' in request.args:
2525
response.headers[
2626
'Content-Disposition'
2727
] = f'attachment; filename={event.identifier}-{event.name}-Calendar.ics;'

0 commit comments

Comments
 (0)