diff options
| author | rr- | 2016-09-26 22:14:08 +0200 |
|---|---|---|
| committer | rr- | 2016-09-26 22:48:09 +0200 |
| commit | 1e65622daf4e43d0884b61b6a4b4e32aa5b907d8 (patch) | |
| tree | 206963d9077f829465b14f2a180f3c1687376260 | |
| parent | 1bd8af47b0634ce952bf2a14be99e7ea807a03bb (diff) | |
server/search: don't be a hardass about strings
Let range criteria (values that contain ..) that end up being used as
strings, to be used as if they were simple criteria. So let the user
search for "when_you_see_it..." and don't throw a warning.
| -rw-r--r-- | server/szurubooru/search/configs/util.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/server/szurubooru/search/configs/util.py b/server/szurubooru/search/configs/util.py index d3cb584..451179b 100644 --- a/server/szurubooru/search/configs/util.py +++ b/server/szurubooru/search/configs/util.py @@ -60,8 +60,7 @@ def apply_str_criterion_to_column( for value in criterion.values: expr = expr | column.ilike(transformer(value)) elif isinstance(criterion, criteria.RangedCriterion): - raise errors.SearchError( - 'Composite token %r is invalid in this context.' % (criterion,)) + expr = column.ilike(transformer(criterion.original_text)) else: assert False return expr |