Skip to content

Commit

Permalink
Bugfix for filter listing when items is null
Browse files Browse the repository at this point in the history
  • Loading branch information
mrbokster committed Nov 13, 2023
1 parent 2f40969 commit b58f74a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions resources/lib/criterion_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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

0 comments on commit b58f74a

Please sign in to comment.