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"): if hasattr(component, "rrule"):
rulleset = component.getrruleset() rulleset = component.getrruleset()
instances = rulleset.between(start, end) recurrences = rulleset.between(start, end)
for instance in instances: expanded = []
for recurrence_dt in recurrences:
try: try:
delattr(item.vobject_item.vevent, 'recurrence-id') delattr(item.vobject_item.vevent, 'recurrence-id')
except AttributeError: except AttributeError:
pass 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() element.text = item.vobject_item.serialize()
expanded.append(element) expanded.append(element)