Skip to content

Commit 326035d

Browse files
committed
fix for issue #495
1 parent 0cea4d3 commit 326035d

2 files changed

Lines changed: 1 addition & 7 deletions

File tree

caldav/calendarobjectresource.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1329,8 +1329,6 @@ def complete(
13291329
self.save()
13301330

13311331
def _complete_ical(self, i=None, completion_timestamp=None) -> None:
1332-
## my idea was to let self.complete call this one ... but self.complete
1333-
## should use vobject and not icalendar library due to backward compatibility.
13341332
if i is None:
13351333
i = self.icalendar_component
13361334
assert self._is_pending(i)

caldav/collection.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -850,11 +850,7 @@ def search(
850850
## and still, Zimbra seems to deliver too many TODOs in the
851851
## matches2 ... let's do some post-filtering in case the
852852
## server fails in filtering things the right way
853-
if "STATUS:NEEDS-ACTION" in item.data or (
854-
"\nCOMPLETED:" not in item.data
855-
and "\nSTATUS:COMPLETED" not in item.data
856-
and "\nSTATUS:CANCELLED" not in item.data
857-
):
853+
if any(x.get('STATUS') not in ('COMPLETED', 'CANCELLED') for x in item.icalendar_instance.subcomponents):
858854
objects.append(item)
859855
else:
860856
if not xml:

0 commit comments

Comments
 (0)