From b58f74a929c95bf1f4d74d009c4da91f7f115d53 Mon Sep 17 00:00:00 2001 From: mrbokster Date: Mon, 13 Nov 2023 20:59:42 +0100 Subject: [PATCH] Bugfix for filter listing when items is null --- resources/lib/criterion_parser.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/lib/criterion_parser.py b/resources/lib/criterion_parser.py index dd4a2ab..75c9d4f 100644 --- a/resources/lib/criterion_parser.py +++ b/resources/lib/criterion_parser.py @@ -20,7 +20,7 @@ def parse_criterion(criterion): value = criterion.get('value', '') if isinstance(value, dict) and 'depth' in value: - if 'items' in value: + if 'items' in value and value['items'] is not None: filter['value'] = list(map(lambda v: v['id'], value['items'])) if 'excluded' in value: @@ -31,7 +31,7 @@ def parse_criterion(criterion): filter.update(value) elif isinstance(value, list): filter['value'] = list(map(lambda v: v['id'], value)) - else: + elif value is not '': filter['value'] = value return filter