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.
This commit is contained in:
rr- 2016-09-26 22:14:08 +02:00
parent 1bd8af47b0
commit 1e65622daf
1 changed files with 1 additions and 2 deletions

View File

@ -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