diff options
author | Anton Khirnov <anton@khirnov.net> | 2021-01-20 20:49:13 +0100 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2021-01-20 20:49:13 +0100 |
commit | 49b6ceb067a0931388c0abbf29b83b76021038be (patch) | |
tree | 00705b58de23be4aa4c3ee69e6e17b0b3e985329 | |
parent | 180d6c5e439bfca2af479b445afff9b18e28df5a (diff) |
db/thread: add parentheses for chaining queries
-rw-r--r-- | alot/db/thread.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/alot/db/thread.py b/alot/db/thread.py index 37cc5fc7..65e74a35 100644 --- a/alot/db/thread.py +++ b/alot/db/thread.py @@ -234,7 +234,6 @@ class Thread: :returns: True if this thread matches the given query, False otherwise :rtype: bool """ - thread_query = 'thread:{tid} AND {subquery}'.format(tid=self.id, - subquery=query) + thread_query = 'thread:%s AND (%s)' % (self.id, query) num_matches = self._dbman.count_messages(thread_query) return num_matches > 0 |