1
0
Fork 0
mirror of https://github.com/Kozea/Radicale.git synced 2025-08-31 19:50:55 +00:00

Cosmetic changes

This commit is contained in:
Unrud 2020-01-21 19:40:02 +01:00
parent fc180266d5
commit db7587c593
7 changed files with 35 additions and 38 deletions

View file

@ -450,8 +450,7 @@ def text_match(vobject_item, filter_, child_name, ns, attrib_name=None):
condition = any(match(child.value) for child in children)
if filter_.get("negate-condition") == "yes":
return not condition
else:
return condition
return condition
def param_filter_match(vobject_item, filter_, parent_name, ns):
@ -467,10 +466,9 @@ def param_filter_match(vobject_item, filter_, parent_name, ns):
if filter_[0].tag == xmlutils.make_clark("%s:text-match" % ns):
return condition and text_match(
vobject_item, filter_[0], parent_name, ns, name)
elif filter_[0].tag == xmlutils.make_clark("%s:is-not-defined" % ns):
if filter_[0].tag == xmlutils.make_clark("%s:is-not-defined" % ns):
return not condition
else:
return condition
return condition
def simplify_prefilters(filters, collection_tag="VCALENDAR"):