Skip to content

Commit

Permalink
fix include/exclude support
Browse files Browse the repository at this point in the history
  • Loading branch information
gitgiggety committed Nov 12, 2023
1 parent 6c33b93 commit 9d6c07a
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions resources/lib/criterion_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,12 @@ def parse_criterion(criterion):

value = criterion.get('value', '')
if isinstance(value, dict) and 'depth' in value:
if(value['items'] is None):
filter['value'] = list(map(lambda v: v['id'], value['excluded']))
else:
if 'items' in value:
filter['value'] = list(map(lambda v: v['id'], value['items']))

if 'excluded' in value:
filter['excludes'] = list(map(lambda v: v['id'], value['excluded']))

filter['depth'] = value['depth']
elif isinstance(value, dict) and not value.keys() - ['value', 'value2']:
filter.update(value)
Expand Down

0 comments on commit 9d6c07a

Please sign in to comment.