mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Prevent exception with search text.
This commit is contained in:
parent
1a10ff20ad
commit
0a9ddcda0c
@ -240,6 +240,8 @@ class BooksModel(QAbstractTableModel):
|
|||||||
self.count_changed()
|
self.count_changed()
|
||||||
|
|
||||||
def clean_search_text(self, text):
|
def clean_search_text(self, text):
|
||||||
|
if not text:
|
||||||
|
return text
|
||||||
tokens = text.split(' ')
|
tokens = text.split(' ')
|
||||||
for i, token in enumerate(tokens):
|
for i, token in enumerate(tokens):
|
||||||
if token.strip().endswith(':') or token.strip() == '':
|
if token.strip().endswith(':') or token.strip() == '':
|
||||||
|
Loading…
x
Reference in New Issue
Block a user