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:
parent
ae731290c1
commit
a07813ecc9
1 changed files with 4 additions and 3 deletions
|
@ -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)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue