don't fail with empty fulltext query

This commit is contained in:
j 2020-01-21 14:09:01 +01:00
parent c64b13537b
commit 53ed483f9c

View file

@ -63,7 +63,7 @@ class FulltextMixin:
@classmethod
def find_fulltext_ids(cls, query):
if query[0] == '"' and query[-1] == '"':
if query and query[0] == '"' and query[-1] == '"':
query = {
"match_phrase": {
"text": query.lower()[1:-1]