From 2ee1ed568779567ed9977f2d647fd7bd732b55eb Mon Sep 17 00:00:00 2001 From: Tobias Brox Date: Tue, 14 Feb 2023 22:18:51 +0100 Subject: [PATCH] not so very well tested fox for https://github.com/python-caldav/caldav/issues/267 (#268) --- caldav/objects.py | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/caldav/objects.py b/caldav/objects.py index e32ca33b..3bf2e91b 100644 --- a/caldav/objects.py +++ b/caldav/objects.py @@ -1058,16 +1058,13 @@ def search( for o in objects: if not o.data: + ## TODO: all objects here should have data, unless the calendar server is breaking the caldav standard. + ## Perhaps we should load missing data? continue - components = o.vobject_instance.components() - for i in components: - if i.name in ("VEVENT", "VTODO"): - ## Those recurrance properties should not be in the returns from the server, - ## if they are present it indicates that server expand didn't work and we'll - ## have to do it on the client side - recurrance_properties = ["exdate", "exrule", "rdate", "rrule"] - if any(key in recurrance_properties for key in i.contents): - o.expand_rrule(start, end) + component = o.icalendar_component + recurrance_properties = ["exdate", "exrule", "rdate", "rrule"] + if any(key in component for key in recurrance_properties): + o.expand_rrule(start, end) if split_expanded: objects_ = objects objects = []