From 3afdc73bc64262a31d81e4eeebb139bae77fbf43 Mon Sep 17 00:00:00 2001 From: David Greaves Date: Thu, 3 Jul 2025 18:07:03 +0100 Subject: [PATCH] The item's rrule and time_range are in the vobject_item Signed-off-by: David Greaves --- radicale/app/report.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/radicale/app/report.py b/radicale/app/report.py index cfd76a42..979e949f 100644 --- a/radicale/app/report.py +++ b/radicale/app/report.py @@ -261,9 +261,15 @@ def xml_report(base_prefix: str, path: str, xml_request: Optional[ET.Element], (item.href, collection.path, e)) from e # Filtering non-recurring events by time-range - if (expand is not None) and (time_range_element is not None) and not hasattr(item, 'rrule'): + if hasattr(item.vobject_item, "vevent_list") and len(item.vobject_item.vevent_list) != 1: + # Not sure how to loop over these vevents + raise ValueError("vobject has too many events") + if ((expand is not None) and + (time_range_element is not None) and + not hasattr(item.vobject_item.vevent, + 'rrule')): start, end = radicale_filter.time_range_timestamps(time_range_element) - istart, iend = item.time_range + istart, iend = item.vobject_item.time_range if istart >= end or iend <= start: continue