-
Notifications
You must be signed in to change notification settings - Fork 450
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1643 from pbiering/fix-issue-1635
ignore RRULESET if empty in item
- Loading branch information
Showing
4 changed files
with
71 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,8 @@ | |
# Copyright © 2008 Nicolas Kandel | ||
# Copyright © 2008 Pascal Halter | ||
# Copyright © 2008-2015 Guillaume Ayoub | ||
# Copyright © 2017-2018 Unrud <[email protected]> | ||
# Copyright © 2017-2021 Unrud <[email protected]> | ||
# Copyright © 2024-2024 Peter Bieringer <[email protected]> | ||
# | ||
# This library is free software: you can redistribute it and/or modify | ||
# it under the terms of the GNU General Public License as published by | ||
|
@@ -273,8 +274,11 @@ def get_children(components: Iterable[vobject.base.Component]) -> Iterator[ | |
if hasattr(comp, "recurrence_id") and comp.recurrence_id.value: | ||
recurrences.append(comp.recurrence_id.value) | ||
if comp.rruleset: | ||
# Prevent possible infinite loop | ||
raise ValueError("Overwritten recurrence with RRULESET") | ||
if comp.rruleset._len is None: | ||
logger.warning("Ignore empty RRULESET in item at RECURRENCE-ID with value '%s' and UID '%s'", comp.recurrence_id.value, comp.uid.value) | ||
else: | ||
# Prevent possible infinite loop | ||
raise ValueError("Overwritten recurrence with RRULESET") | ||
rec_main = comp | ||
yield comp, True, [] | ||
else: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
BEGIN:VCALENDAR | ||
VERSION:2.0 | ||
PRODID:DAVx5/4.4.3.2-ose ical4j/3.2.19 | ||
BEGIN:VEVENT | ||
DTSTAMP:20241125T195941Z | ||
UID:9fb6578a-07a6-4c61-8406-69229713d40e | ||
SEQUENCE:3 | ||
SUMMARY:Escalade | ||
DTSTART;TZID=Europe/Paris:20240606T193000 | ||
DTEND;TZID=Europe/Paris:20240606T203000 | ||
RRULE:FREQ=WEEKLY;WKST=MO;BYDAY=TH | ||
EXDATE;TZID=Europe/Paris:20240704T193000 | ||
CLASS:PUBLIC | ||
STATUS:CONFIRMED | ||
BEGIN:VALARM | ||
TRIGGER:-P1D | ||
ACTION:DISPLAY | ||
DESCRIPTION:Escalade | ||
END:VALARM | ||
END:VEVENT | ||
BEGIN:VEVENT | ||
DTSTAMP:20241125T195941Z | ||
UID:9fb6578a-07a6-4c61-8406-69229713d40e | ||
RECURRENCE-ID;TZID=Europe/Paris:20241128T193000 | ||
SEQUENCE:1 | ||
SUMMARY:Escalade avec Romain | ||
DTSTART;TZID=Europe/Paris:20241128T193000 | ||
DTEND;TZID=Europe/Paris:20241128T203000 | ||
EXDATE;TZID=Europe/Paris:20240704T193000 | ||
CLASS:PUBLIC | ||
STATUS:CONFIRMED | ||
BEGIN:VALARM | ||
TRIGGER:-P1D | ||
ACTION:DISPLAY | ||
DESCRIPTION:Escalade avec Romain | ||
END:VALARM | ||
END:VEVENT | ||
BEGIN:VTIMEZONE | ||
TZID:Europe/Paris | ||
BEGIN:STANDARD | ||
TZNAME:CET | ||
TZOFFSETFROM:+0200 | ||
TZOFFSETTO:+0100 | ||
DTSTART:19961027T030000 | ||
RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU | ||
END:STANDARD | ||
BEGIN:DAYLIGHT | ||
TZNAME:CEST | ||
TZOFFSETFROM:+0100 | ||
TZOFFSETTO:+0200 | ||
DTSTART:19810329T020000 | ||
RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=-1SU | ||
END:DAYLIGHT | ||
END:VTIMEZONE | ||
END:VCALENDAR |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
# This file is part of Radicale - CalDAV and CardDAV server | ||
# Copyright © 2012-2017 Guillaume Ayoub | ||
# Copyright © 2017-2019 Unrud <[email protected]> | ||
# Copyright © 2017-2022 Unrud <[email protected]> | ||
# Copyright © 2024-2024 Peter Bieringer <[email protected]> | ||
# | ||
# This library is free software: you can redistribute it and/or modify | ||
# it under the terms of the GNU General Public License as published by | ||
|
@@ -166,6 +167,12 @@ def test_add_event_with_mixed_datetime_and_date(self) -> None: | |
event = get_file_content("event_mixed_datetime_and_date.ics") | ||
self.put("/calendar.ics/event.ics", event) | ||
|
||
def test_add_event_with_exdate_without_rrule(self) -> None: | ||
"""Test event with EXDATE but not having RRULE.""" | ||
self.mkcalendar("/calendar.ics/") | ||
event = get_file_content("event_exdate_without_rrule.ics") | ||
self.put("/calendar.ics/event.ics", event) | ||
|
||
def test_add_todo(self) -> None: | ||
"""Add a todo.""" | ||
self.mkcalendar("/calendar.ics/") | ||
|