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