From 38845da7624f6bf61a9fbb1a8d61e5b998a829ab Mon Sep 17 00:00:00 2001 From: Nicolas Bonfante Date: Wed, 15 Jun 2016 15:48:35 +0200 Subject: [PATCH 1/2] solve bug in vjournal time filter --- radicale/xmlutils.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/radicale/xmlutils.py b/radicale/xmlutils.py index 53354811..93c2860e 100644 --- a/radicale/xmlutils.py +++ b/radicale/xmlutils.py @@ -311,7 +311,6 @@ def _time_range_match(vobject_item, filter_, child_name): elif child_name == "VJOURNAL": dtstart = getattr(child, "dstart", None) - if dtstart is not None: dtstart = dtstart.value if not isinstance(dtstart, datetime): @@ -321,7 +320,6 @@ def _time_range_match(vobject_item, filter_, child_name): .replace(tzinfo=timezone.utc)) else: dtstart_is_datetime = True - if dtstart_is_datetime: # Line 1 return start <= dtstart and end > dtstart From 32b2ecccc95c4f89d5b5dd146c27112ee2be7fc6 Mon Sep 17 00:00:00 2001 From: Nicolas Bonfante Date: Wed, 15 Jun 2016 15:49:00 +0200 Subject: [PATCH 2/2] addign test for vjournal filtering --- tests/test_base.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tests/test_base.py b/tests/test_base.py index df7eee25..c5add4b4 100644 --- a/tests/test_base.py +++ b/tests/test_base.py @@ -371,6 +371,15 @@ class BaseRequests: assert "href>/calendar.ics/event4.ics/calendar.ics/event5.ics + + + + """], "journal", events=1) + assert "href>/calendar.ics/journal1.ics/calendar.ics/journal2.ics