mirror of
https://github.com/Kozea/Radicale.git
synced 2025-06-26 16:45:52 +00:00
Handle lists in filter values for CATEGORIES
Issue #1125 Signed-off-by: David Greaves <david@dgreaves.com>
This commit is contained in:
parent
11a2b43b60
commit
7b98a0028b
1 changed files with 9 additions and 1 deletions
|
@ -468,7 +468,15 @@ def text_match(vobject_item: vobject.base.Component,
|
|||
match(attrib) for child in children
|
||||
for attrib in child.params.get(attrib_name, []))
|
||||
else:
|
||||
condition = any(match(child.value) for child in children)
|
||||
res = []
|
||||
for child in children:
|
||||
# Some filters such as CATEGORIES provide a list in child.value
|
||||
if type(child.value) is list:
|
||||
for value in child.value:
|
||||
res.append(match(value))
|
||||
else:
|
||||
res.append(match(child.value))
|
||||
condition = any(res)
|
||||
if filter_.get("negate-condition") == "yes":
|
||||
return not condition
|
||||
return condition
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue