Allow generic component names for simplified prefilters
This commit is contained in:
parent
81c596eb1d
commit
85d80fe9fc
@ -600,12 +600,14 @@ def simplify_prefilters(filters):
|
|||||||
simple = False
|
simple = False
|
||||||
continue
|
continue
|
||||||
tag = comp_filter.get("name").upper()
|
tag = comp_filter.get("name").upper()
|
||||||
if (tag not in ("VTODO", "VEVENT", "VJOURNAL") or comp_filter.find(
|
if comp_filter.find(_tag("C", "is-not-defined")) is not None:
|
||||||
_tag("C", "is-not-defined")) is not None):
|
|
||||||
simple = False
|
simple = False
|
||||||
continue
|
continue
|
||||||
simple &= len(comp_filter) <= 1
|
simple &= len(comp_filter) <= 1
|
||||||
for time_filter in comp_filter:
|
for time_filter in comp_filter:
|
||||||
|
if tag not in ("VTODO", "VEVENT", "VJOURNAL"):
|
||||||
|
simple = False
|
||||||
|
break
|
||||||
if time_filter.tag != _tag("C", "time-range"):
|
if time_filter.tag != _tag("C", "time-range"):
|
||||||
simple = False
|
simple = False
|
||||||
continue
|
continue
|
||||||
|
Loading…
Reference in New Issue
Block a user