From a07813ecc96f326b0c7217c223f744a4db9f2a75 Mon Sep 17 00:00:00 2001 From: Georgiy Date: Thu, 30 Mar 2023 19:43:15 +0300 Subject: [PATCH] fix variables naming, fix recurrence element duplication --- radicale/app/report.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/radicale/app/report.py b/radicale/app/report.py index d5c94f8c..e9cd57d9 100644 --- a/radicale/app/report.py +++ b/radicale/app/report.py @@ -203,15 +203,16 @@ def _expand( if hasattr(component, "rrule"): rulleset = component.getrruleset() - instances = rulleset.between(start, end) + recurrences = rulleset.between(start, end) - for instance in instances: + expanded = [] + for recurrence_dt in recurrences: try: delattr(item.vobject_item.vevent, 'recurrence-id') except AttributeError: pass - item.vobject_item.vevent.add('RECURRENCE-ID').value = instance + item.vobject_item.vevent.add('RECURRENCE-ID').value = recurrence_dt element.text = item.vobject_item.serialize() expanded.append(element)