From 85d80fe9fc4f995a58e9c1d55abbb643462fc233 Mon Sep 17 00:00:00 2001 From: Unrud Date: Thu, 7 Sep 2017 20:26:31 +0200 Subject: [PATCH] Allow generic component names for simplified prefilters --- radicale/xmlutils.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/radicale/xmlutils.py b/radicale/xmlutils.py index 686cc46..5bd2ae0 100644 --- a/radicale/xmlutils.py +++ b/radicale/xmlutils.py @@ -600,12 +600,14 @@ def simplify_prefilters(filters): simple = False continue tag = comp_filter.get("name").upper() - if (tag not in ("VTODO", "VEVENT", "VJOURNAL") or comp_filter.find( - _tag("C", "is-not-defined")) is not None): + if comp_filter.find(_tag("C", "is-not-defined")) is not None: simple = False continue simple &= len(comp_filter) <= 1 for time_filter in comp_filter: + if tag not in ("VTODO", "VEVENT", "VJOURNAL"): + simple = False + break if time_filter.tag != _tag("C", "time-range"): simple = False continue