Skip to content

Commit 1735d1e

Browse files
authored
Merge pull request #2230 from wger-project/dependabot/uv/icalendar-7.0.2
Bump icalendar from 6.3.2 to 7.0.2
2 parents 09939d7 + cb608d7 commit 1735d1e

File tree

3 files changed

+8
-11
lines changed

3 files changed

+8
-11
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ dependencies = [
5454
"flower~=2.0.1",
5555
"fontawesomefree~=6.6.0",
5656
"gevent>=25.9.1",
57-
"icalendar~=6.3.2",
57+
"icalendar~=7.0.2",
5858
"invoke~=2.2.1",
5959
"lingua-language-detector~=2.1.1",
6060
"openfoodfacts~=3.4.5",

uv.lock

Lines changed: 5 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

wger/manager/views/ical.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@
1616

1717
# Standard Library
1818
import logging
19+
import uuid
1920

2021
# Django
21-
from django.contrib.sites.models import Site
2222
from django.http import (
2323
HttpResponse,
2424
HttpResponseForbidden,
@@ -30,7 +30,6 @@
3030
Calendar,
3131
Event,
3232
)
33-
from icalendar.tools import UIDGenerator
3433

3534
# wger
3635
from wger.manager.models import Routine
@@ -70,9 +69,6 @@ def get_events_workout(calendar, routine: Routine):
7069
the calendar.
7170
"""
7271

73-
generator = UIDGenerator()
74-
site = Site.objects.get_current()
75-
7672
for day_data in routine.date_sequence:
7773
if day_data.day is None or day_data.day.is_rest:
7874
continue
@@ -82,7 +78,7 @@ def get_events_workout(calendar, routine: Routine):
8278
event.add('description', day_data.day.description)
8379
event.add('dtstart', day_data.date)
8480
event.add('dtend', day_data.date)
85-
event['uid'] = generator.uid(host_name=site.domain)
81+
event['uid'] = uuid.uuid4()
8682
event.add('priority', 5)
8783
calendar.add_component(event)
8884

0 commit comments

Comments
 (0)