1
0
Fork 0
mirror of https://github.com/Kozea/Radicale.git synced 2025-08-01 18:18:31 +00:00

fix variables naming, fix recurrence element duplication

This commit is contained in:
Georgiy 2023-03-30 19:43:15 +03:00
parent ae731290c1
commit a07813ecc9

View file

@ -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)