diff options
author | Étienne Loks <etienne.loks@iggdrasil.net> | 2018-11-08 12:05:28 +0100 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2018-11-08 12:05:28 +0100 |
commit | a8172b647980667bef078c865034b52f6523be4b (patch) | |
tree | d75272ba1ec06b9e1cf50d3bab9b565a4360d74f /ishtar_common | |
parent | 43ce28e0926e991a0b7e34e11cb943e640ae12b5 (diff) | |
download | Ishtar-a8172b647980667bef078c865034b52f6523be4b.tar.bz2 Ishtar-a8172b647980667bef078c865034b52f6523be4b.zip |
Fix mixed search
Diffstat (limited to 'ishtar_common')
-rw-r--r-- | ishtar_common/views_item.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ishtar_common/views_item.py b/ishtar_common/views_item.py index c14973bc3..aa017c7ad 100644 --- a/ishtar_common/views_item.py +++ b/ishtar_common/views_item.py @@ -383,6 +383,9 @@ def _parse_parentheses_groups(groups, request_keys, current_dct=None, exc_dct = {} if type(groups) is not list: string = groups.strip() + if string.startswith(u'"') and string.endswith(u'"') and \ + string.count(u'"') == 2: + string = string[1:-1] # split into many groups if spaces # do not split inside quotes @@ -454,9 +457,6 @@ def _search_manage_search_vector(model, dct, exc_dct, request_keys): # remove inside parenthesis search_query = \ search_query.replace(u'(', u'').replace(u')', u'').strip() - # manage full quoted - if search_query.startswith(u'"') and search_query.endswith(u'"'): - search_query = search_query[1:-1].replace(u" ", u" & ").strip() if search_query: dct['extras'].append( {'where': [model._meta.db_table + |