From 49b6ceb067a0931388c0abbf29b83b76021038be Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Wed, 20 Jan 2021 20:49:13 +0100 Subject: db/thread: add parentheses for chaining queries --- alot/db/thread.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'alot/db') 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 -- cgit v1.2.3