We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 58ca4cd commit 3ef5644Copy full SHA for 3ef5644
haystack/query.py
@@ -456,10 +456,11 @@ def autocomplete(self, **kwargs):
456
for field_name, query in kwargs.items():
457
for word in query.split(' '):
458
bit = clone.query.clean(word.strip())
459
- kwargs = {
460
- field_name: bit,
461
- }
462
- query_bits.append(SQ(**kwargs))
+ if bit:
+ kwargs = {
+ field_name: bit,
+ }
463
+ query_bits.append(SQ(**kwargs))
464
465
return clone.filter(six.moves.reduce(operator.__and__, query_bits))
466
0 commit comments