From 566f5ac00e839ada79a12d37b134e30f9d3bf440 Mon Sep 17 00:00:00 2001 From: gitgiggety Date: Tue, 14 Nov 2023 21:06:38 +0100 Subject: [PATCH] add special handling for stash_id_endpoint --- resources/lib/criterion_parser.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/resources/lib/criterion_parser.py b/resources/lib/criterion_parser.py index b697b04..25e95a8 100644 --- a/resources/lib/criterion_parser.py +++ b/resources/lib/criterion_parser.py @@ -31,7 +31,10 @@ def parse_criterion(criterion): filter.update(value) elif isinstance(value, list): filter['value'] = list(map(lambda v: v['id'], value)) - elif 'value' in criterion: + elif isinstance(value, dict) and not value.keys() - ['endpoint', 'stashID']: + filter['endpoint'] = value.get('endpoint') + filter['stash_id'] = value.get('stashID') + else: filter['value'] = value return filter