diff options
author | Lucas Hoffmann <l-m-h@web.de> | 2017-08-04 17:07:49 +0200 |
---|---|---|
committer | Lucas Hoffmann <l-m-h@web.de> | 2017-08-05 01:41:01 +0200 |
commit | 2ee94cd0f9c6de1a0ca79f2ef44b414071db04e3 (patch) | |
tree | 68b2d0250b1d07e691a127d7b14cd88c16db83e6 /alot | |
parent | e7d25a5745b20a87555c0adf042d5eec580a2551 (diff) |
Fix operator precedence when matching messages
If the querystring did contain an OR the results where misleading as the
AND binds stronger.
Diffstat (limited to 'alot')
-rw-r--r-- | alot/db/message.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/alot/db/message.py b/alot/db/message.py index 747321be..5b0c19dc 100644 --- a/alot/db/message.py +++ b/alot/db/message.py @@ -254,5 +254,5 @@ class Message(object): def matches(self, querystring): """tests if this messages is in the resultset for `querystring`""" - searchfor = querystring + ' AND id:' + self._id + searchfor = '( {} ) AND id:{}'.format(querystring, self._id) return self._dbman.count_messages(searchfor) > 0 |