caldav_sync fix a walrus operator/and precedence bug
This commit is contained in:
parent
ece737826c
commit
00a940672a
1 changed files with 3 additions and 2 deletions
|
|
@ -335,8 +335,9 @@ class CalendarEvent(models.Model):
|
||||||
) -> Optional[int]:
|
) -> Optional[int]:
|
||||||
ical_instance = caldav_event.icalendar_instance
|
ical_instance = caldav_event.icalendar_instance
|
||||||
for index, component in enumerate(ical_instance.subcomponents):
|
for index, component in enumerate(ical_instance.subcomponents):
|
||||||
if component.get("name") == "VEVENT" and (
|
if (
|
||||||
rec_id := component.get("recurrence-id")
|
component.get("name") == "VEVENT"
|
||||||
|
and (rec_id := component.get("recurrence-id"))
|
||||||
and rec_id.dt == self._get_ical_recurrence_id()
|
and rec_id.dt == self._get_ical_recurrence_id()
|
||||||
):
|
):
|
||||||
return index
|
return index
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue