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 | 67d5f18e392e6454dfdbddbb6c151b570c7de784 (patch) | |
tree | d75272ba1ec06b9e1cf50d3bab9b565a4360d74f /ishtar_common | |
parent | 3ead19c90fe9ccb463c881f42da4f3f441712d15 (diff) | |
download | Ishtar-67d5f18e392e6454dfdbddbb6c151b570c7de784.tar.bz2 Ishtar-67d5f18e392e6454dfdbddbb6c151b570c7de784.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 + |